In [1]:
rm(list=ls())
gc()
setwd("/hpc/group/pbenfeylab/CheWei/CW_data/genesys/")
A matrix: 2 x 6 of type dbl
used(Mb)gc trigger(Mb)max used(Mb)
Ncells 62529333.4136147072.8136147072.8
Vcells1159120 8.9838860864.0180227913.8
In [2]:
## Need seu4
suppressMessages(library(Seurat))
suppressMessages(library(cowplot))
suppressMessages(library(scattermore))
suppressMessages(library(scater))
suppressMessages(library(cowplot))
suppressMessages(library(RColorBrewer))
suppressMessages(library(grid))
suppressMessages(library(gplots))
suppressMessages(library(circular))
suppressMessages(library(ggplot2))
suppressMessages(library(ggnewscale))
suppressMessages(library(tidyverse))
suppressMessages(library(ComplexHeatmap))
suppressMessages(library(circlize))
suppressMessages(library(patchwork))
In [3]:
sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: AlmaLinux 9.3 (Shamrock Pampas Cat)

Matrix products: default
BLAS/LAPACK: /hpc/group/pbenfeylab/ch416/miniconda3/envs/seu4/lib/libopenblasp-r0.3.21.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] grid      stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] patchwork_1.1.3             circlize_0.4.15            
 [3] ComplexHeatmap_2.14.0       forcats_0.5.2              
 [5] stringr_1.5.1               dplyr_1.1.3                
 [7] purrr_1.0.2                 readr_2.1.3                
 [9] tidyr_1.3.0                 tibble_3.2.1               
[11] tidyverse_1.3.2             ggnewscale_0.4.8           
[13] circular_0.4-95             gplots_3.1.3               
[15] RColorBrewer_1.1-3          scater_1.26.1              
[17] ggplot2_3.4.4               scuttle_1.8.0              
[19] SingleCellExperiment_1.20.0 SummarizedExperiment_1.28.0
[21] Biobase_2.58.0              GenomicRanges_1.50.0       
[23] GenomeInfoDb_1.34.8         IRanges_2.32.0             
[25] S4Vectors_0.36.0            BiocGenerics_0.44.0        
[27] MatrixGenerics_1.10.0       matrixStats_1.1.0          
[29] scattermore_1.2             cowplot_1.1.1              
[31] SeuratObject_4.1.3          Seurat_4.1.1.9001          

loaded via a namespace (and not attached):
  [1] utf8_1.2.4                spatstat.explore_3.2-5   
  [3] reticulate_1.34.0         tidyselect_1.2.0         
  [5] htmlwidgets_1.6.2         BiocParallel_1.32.5      
  [7] Rtsne_0.16                munsell_0.5.0            
  [9] ScaledMatrix_1.6.0        codetools_0.2-19         
 [11] ica_1.0-3                 pbdZMQ_0.3-8             
 [13] future_1.33.0             miniUI_0.1.1.1           
 [15] withr_2.5.2               spatstat.random_3.2-1    
 [17] colorspace_2.1-0          progressr_0.14.0         
 [19] uuid_1.1-0                ROCR_1.0-11              
 [21] tensor_1.5                listenv_0.9.0            
 [23] repr_1.1.4                GenomeInfoDbData_1.2.9   
 [25] polyclip_1.10-6           parallelly_1.36.0        
 [27] vctrs_0.6.4               generics_0.1.3           
 [29] timechange_0.1.1          doParallel_1.0.17        
 [31] R6_2.5.1                  clue_0.3-64              
 [33] ggbeeswarm_0.7.1          rsvd_1.0.5               
 [35] bitops_1.0-7              spatstat.utils_3.0-4     
 [37] DelayedArray_0.24.0       assertthat_0.2.1         
 [39] promises_1.2.1            scales_1.2.1             
 [41] googlesheets4_1.0.1       beeswarm_0.4.0           
 [43] gtable_0.3.4              beachmat_2.14.0          
 [45] globals_0.16.2            goftest_1.2-3            
 [47] rlang_1.1.2               GlobalOptions_0.1.2      
 [49] splines_4.2.2             lazyeval_0.2.2           
 [51] gargle_1.2.1              spatstat.geom_3.2-7      
 [53] broom_1.0.2               modelr_0.1.10            
 [55] reshape2_1.4.4            abind_1.4-5              
 [57] backports_1.4.1           httpuv_1.6.12            
 [59] tools_4.2.2               ellipsis_0.3.2           
 [61] ggridges_0.5.4            Rcpp_1.0.11              
 [63] plyr_1.8.9                base64enc_0.1-3          
 [65] sparseMatrixStats_1.10.0  zlibbioc_1.44.0          
 [67] RCurl_1.98-1.6            deldir_1.0-9             
 [69] GetoptLong_1.0.5          pbapply_1.7-2            
 [71] viridis_0.6.4             zoo_1.8-12               
 [73] haven_2.5.1               ggrepel_0.9.4            
 [75] cluster_2.1.4             fs_1.6.3                 
 [77] magrittr_2.0.3            data.table_1.14.8        
 [79] RSpectra_0.16-1           reprex_2.0.2             
 [81] lmtest_0.9-40             RANN_2.6.1               
 [83] googledrive_2.0.0         mvtnorm_1.1-3            
 [85] fitdistrplus_1.1-11       hms_1.1.2                
 [87] mime_0.12                 evaluate_0.23            
 [89] xtable_1.8-4              readxl_1.4.1             
 [91] shape_1.4.6               fastDummies_1.7.3        
 [93] gridExtra_2.3             compiler_4.2.2           
 [95] KernSmooth_2.23-20        crayon_1.5.2             
 [97] htmltools_0.5.7           tzdb_0.3.0               
 [99] later_1.3.1               lubridate_1.9.0          
[101] DBI_1.1.3                 dbplyr_2.2.1             
[103] MASS_7.3-58.3             boot_1.3-28.1            
[105] Matrix_1.5-4              cli_3.6.1                
[107] parallel_4.2.2            igraph_1.5.1             
[109] pkgconfig_2.0.3           sp_2.1-1                 
[111] IRdisplay_1.1             plotly_4.10.3            
[113] spatstat.sparse_3.0-3     foreach_1.5.2            
[115] xml2_1.3.3                vipor_0.4.5              
[117] XVector_0.38.0            rvest_1.0.3              
[119] digest_0.6.33             sctransform_0.4.1        
[121] RcppAnnoy_0.0.21          spatstat.data_3.0-3      
[123] cellranger_1.1.0          leiden_0.4.3             
[125] uwot_0.1.16               DelayedMatrixStats_1.20.0
[127] shiny_1.7.5.1             gtools_3.9.4             
[129] rjson_0.2.21              lifecycle_1.0.4          
[131] nlme_3.1-162              jsonlite_1.8.7           
[133] BiocNeighbors_1.16.0      viridisLite_0.4.2        
[135] fansi_1.0.5               pillar_1.9.0             
[137] lattice_0.21-8            fastmap_1.1.1            
[139] httr_1.4.7                survival_3.4-0           
[141] glue_1.6.2                iterators_1.0.14         
[143] png_0.1-8                 stringi_1.8.1            
[145] RcppHNSW_0.5.0            BiocSingular_1.14.0      
[147] caTools_1.18.2            IRkernel_1.3.1.9000      
[149] irlba_2.3.5.1             future.apply_1.11.0      

Load TF list¶

In [4]:
wanted_TFs <- read.csv("./Kay_TF_thalemine_annotations.csv")
In [5]:
nrow(wanted_TFs)
2484
In [6]:
## Make TF names unique
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G33880"]="WOX9"
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G45160"]="SCL27"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G04410"]="NAC78"
wanted_TFs$Name[wanted_TFs$GeneID=="AT3G29035"]="ORS1"
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G02540"]="ZHD3"
wanted_TFs$Name[wanted_TFs$GeneID=="AT3G16500"]="IAA26"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G09740"]="HAG5"
wanted_TFs$Name[wanted_TFs$GeneID=="AT4G24660"]="ZHD2"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G46880"]="HDG5"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G28420"]="RLT1"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G14580"]="BLJ"
wanted_TFs$Name[wanted_TFs$GeneID=="AT3G45260"]="BIB"
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G02070"]="RVN"
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G28160"]="FIT"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G68360"]="GIS3"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G20640"]="NLP4"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G05550"]="VFP5"
wanted_TFs$Name[wanted_TFs$GeneID=="AT3G59470"]="FRF1"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G15150"]="HAT7"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G14750"]="WER"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G75710"]="BRON"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G74500"]="TMO7"
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G12646"]="RITF1"
wanted_TFs$Name[wanted_TFs$GeneID=="AT3G48100"]="ARR5"
wanted_TFs$Name[wanted_TFs$GeneID=="AT4G16141"]="GATA17L"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G65640"]="NFL"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G62700"]="VND5"
wanted_TFs$Name[wanted_TFs$GeneID=="AT4G36160"]="VND2"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G66300"]="VND3"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G12260"]="VND4"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G62380"]="VND6"
In [7]:
## TTG1
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G24520"]
'TTG1'
In [8]:
## SCRAMBLED
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G11130"]
In [9]:
## CAPRICE
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G46410"]
'CPC'

Load GRN centrality scores for each transition (LIMA) (GeneSys)¶

In [10]:
stem2pro <- read.csv("./TF_GRN_centrality_t0-t1_zscore3.csv")
pro2trans <- read.csv("./TF_GRN_centrality_t1-t3_zscore3.csv")
trans2el <- read.csv("./TF_GRN_centrality_t3-t5_zscore3.csv")
el2el <- read.csv("./TF_GRN_centrality_t5-t7_zscore3.csv")
el2mat <- read.csv("./TF_GRN_centrality_t7-t9_zscore3.csv")
In [11]:
head(stem2pro)
A data.frame: 6 x 62
Xtf_occuranceatri_degree_centralityatri_out_centralityatri_in_centralityatri_betweenness_centralityatri_closeness_centralityatri_eigenvector_centralitytri_degree_centralitytri_out_centrality...phl_in_centralityphl_betweenness_centralityphl_closeness_centralityphl_eigenvector_centralitycol_degree_centralitycol_out_centralitycol_in_centralitycol_betweenness_centralitycol_closeness_centralitycol_eigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1H2AXA 100.40233720.19699500.20534220.040845670.0028934540.069304890.33855800.10658307...0.202687570.10687509730.00110644110.049170930.31406250.23750000.07656250.48454620.0030692750.05594356
2HB-2 101.02170280.29048410.73121870.884442300.0036205540.103186430.29153610.03134796...0.034714450.00060636040.00110051650.051886641.16875000.62500000.54375000.97515890.0045313340.10857313
3GATA19 101.02003340.63272120.38731220.989221170.0035234330.101546270.25391850.10344828...0.131019040.47934357410.00097285080.041398890.22812500.06093750.16718750.92946010.0036883270.04870697
4HTA10 100.45909850.22370620.23539230.563947160.0029611370.073435450.38557990.12852665...0.288913770.47121859610.00115674350.056808200.27812500.15937500.11875000.60635030.0029572890.05189729
5GAMMA-H2AX100.58764610.37562600.21202000.870427860.0030678450.079595820.82758620.50156740...0.275475920.01417477240.00121030030.054173560.30625000.15468750.15156250.92311230.0034416180.05485739
6GRP2B 90.34056760.19031720.15025040.903211040.0029984680.062788930.00000000.00000000...0.207166850.96187587560.00119173130.080479180.50625000.44843750.05781250.48545820.0039757580.08353683
In [12]:
head(pro2trans)
A data.frame: 6 x 62
Xtf_occuranceatri_degree_centralityatri_out_centralityatri_in_centralityatri_betweenness_centralityatri_closeness_centralityatri_eigenvector_centralitytri_degree_centralitytri_out_centrality...phl_in_centralityphl_betweenness_centralityphl_closeness_centralityphl_eigenvector_centralitycol_degree_centralitycol_out_centralitycol_in_centralitycol_betweenness_centralitycol_closeness_centralitycol_eigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1H2AXA 70.16244730.082278480.080168780.015552940.0011037350.059289810.144654090.058700210...0.211610490.0000000000.00107784200.050359640.359722220.0861111110.273611110.077142250.00076359860.08372615
2BME3 70.26160340.229957810.031645570.038777530.0013000330.076470160.245283020.140461216...0.031835210.6416721120.00067514220.026870880.047222220.0055555560.041666670.000000000.00062923410.02312157
3HAT1 70.30801690.156118140.151898730.838418030.0013729000.087132170.073375260.008385744...0.129213480.8562198280.00075985320.045211890.131944440.0347222220.097222220.801404340.00061574780.04761614
4MYB12 60.43248950.407173000.025316460.184552320.0015446890.099789310.035639410.016771488...0.000000000.0000000000.00000000000.000000000.000000000.0000000000.000000000.000000000.00000000000.00000000
5GRP2B 60.25316460.145569620.107594940.049424180.0013656110.078305560.000000000.000000000...0.054307120.0314135940.00102753560.089679450.083333330.0291666670.054166670.421318190.00044380840.03616124
6GATA1560.37974680.196202530.183544300.062278660.0016105400.095517550.232704400.041928721...0.029962550.0028177720.00054456570.019974580.000000000.0000000000.000000000.000000000.00000000000.00000000
In [13]:
head(trans2el)
A data.frame: 6 x 62
Xtf_occuranceatri_degree_centralityatri_out_centralityatri_in_centralityatri_betweenness_centralityatri_closeness_centralityatri_eigenvector_centralitytri_degree_centralitytri_out_centrality...phl_in_centralityphl_betweenness_centralityphl_closeness_centralityphl_eigenvector_centralitycol_degree_centralitycol_out_centralitycol_in_centralitycol_betweenness_centralitycol_closeness_centralitycol_eigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1AT4G3041060.74683540.605063290.14177220.8564993900.00046754790.154724410.86295500.53319058...0.000000000.00000000.00000000000.000000000.000000000.0000000000.000000000.00000000.00000000000.00000000
2ATCTH 60.30886080.055696200.25316460.0020818610.00046394630.100616840.16059960.02569593...0.000000000.00000000.00000000000.000000000.355329950.2994923860.055837560.76102300.00109025630.08569533
3IAA14 50.33924050.255696200.08354430.0097603290.00039371510.105272740.23126340.13918630...0.000000000.00000000.00000000000.000000000.016497460.0012690360.015228430.00000000.00076510910.01138349
4BIM1 50.53164560.316455700.21518990.0113795540.00046302630.131757440.10706640.06209850...0.073871410.00000000.00036858960.044039740.279187820.1890862940.090101520.94456560.00129193910.07964298
5GATA4 50.29113920.045569620.24556960.0017027570.00053500220.093269110.62955030.02783726...0.000000000.00000000.00000000000.000000000.000000000.0000000000.000000000.00000000.00000000000.00000000
6HAT2 50.00000000.000000000.00000000.0000000000.00000000000.000000000.00000000.00000000...0.072503420.95181120.00035522970.050539350.000000000.0000000000.000000000.00000000.00000000000.00000000
In [14]:
head(el2el)
A data.frame: 6 x 62
Xtf_occuranceatri_degree_centralityatri_out_centralityatri_in_centralityatri_betweenness_centralityatri_closeness_centralityatri_eigenvector_centralitytri_degree_centralitytri_out_centrality...phl_in_centralityphl_betweenness_centralityphl_closeness_centralityphl_eigenvector_centralitycol_degree_centralitycol_out_centralitycol_in_centralitycol_betweenness_centralitycol_closeness_centralitycol_eigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1RD26 70.66972480.434250760.235474010.1455319790.00064671230.130506710.169014080.118309859...0.0042372880.0047127590.00039132200.047708430.011111110.0031746030.0079365080.0000000000.0007171190.006922739
2HAT22 60.13455660.091743120.042813460.0000000000.00043879740.046610330.538028170.400000000...0.0324858760.0000000000.00026777430.028957240.084126980.0190476190.0650793650.0012491480.0011331650.037746444
3MYB7 60.83792050.452599390.385321100.9474681530.00070346440.138800900.000000000.000000000...0.0000000000.0000000000.00000000000.000000000.000000000.0000000000.0000000000.0000000000.0000000000.000000000
4KNAT7 60.38226300.336391440.045871560.2895818090.00060743210.094588280.011267610.005633803...0.0000000000.0000000000.00000000000.000000000.719047620.2841269840.4349206350.8527922880.0016072690.122205425
5ATHB1360.33639140.030581040.305810400.0183486240.00072023550.085351070.067605630.011267606...0.0000000000.0000000000.00000000000.000000000.019047620.0031746030.0158730160.0561283970.0011441120.010720118
6RAV1 60.40061160.229357800.171253820.0044933490.00056686350.100556250.107042250.084507042...0.0564971750.9526266790.00028966410.053857430.142857140.0920634920.0507936510.4508188860.0010497870.047376558
In [15]:
head(el2mat)
A data.frame: 6 x 62
Xtf_occuranceatri_degree_centralityatri_out_centralityatri_in_centralityatri_betweenness_centralityatri_closeness_centralityatri_eigenvector_centralitytri_degree_centralitytri_out_centrality...phl_in_centralityphl_betweenness_centralityphl_closeness_centralityphl_eigenvector_centralitycol_degree_centralitycol_out_centralitycol_in_centralitycol_betweenness_centralitycol_closeness_centralitycol_eigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1HB-1 80.21951220.13240420.087108010.00028020760.00045858780.065515370.102389080.027303754...0.027900150.000000e+000.00033295420.046440300.416376310.1097560980.306620210.39448224700.00155206360.09681453
2WLIM170.52961670.28919860.240418120.96331717060.00057819040.109943360.102389080.088737201...0.038179151.390688e-030.00046319280.051278010.000000000.0000000000.000000000.00000000000.00000000000.00000000
3RD26 70.73867600.50174220.236933800.93634414370.00066380610.130948470.273037540.187713311...0.044052861.943509e-050.00038494590.041424360.019163760.0069686410.012195120.00000000000.00094266140.01042103
4MYB7 70.62369340.42508710.198606270.91212446090.00065168300.118828060.027303750.003412969...0.000000000.000000e+000.00000000000.000000000.000000000.0000000000.000000000.00000000000.00000000000.00000000
5KNAT770.57839720.39721250.181184670.23510635710.00063308180.119035180.000000000.000000000...0.000000000.000000e+000.00000000000.000000000.620209060.2682926830.351916380.86813397300.00135075010.11408248
6BLH3 60.14285710.11498260.027874560.01517994200.00044927470.046306950.013651880.010238908...0.000000000.000000e+000.00000000000.000000000.116724740.0853658540.031358890.00043173950.00126790920.04344304
In [16]:
head(trans2el)
A data.frame: 6 x 62
Xtf_occuranceatri_degree_centralityatri_out_centralityatri_in_centralityatri_betweenness_centralityatri_closeness_centralityatri_eigenvector_centralitytri_degree_centralitytri_out_centrality...phl_in_centralityphl_betweenness_centralityphl_closeness_centralityphl_eigenvector_centralitycol_degree_centralitycol_out_centralitycol_in_centralitycol_betweenness_centralitycol_closeness_centralitycol_eigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1AT4G3041060.74683540.605063290.14177220.8564993900.00046754790.154724410.86295500.53319058...0.000000000.00000000.00000000000.000000000.000000000.0000000000.000000000.00000000.00000000000.00000000
2ATCTH 60.30886080.055696200.25316460.0020818610.00046394630.100616840.16059960.02569593...0.000000000.00000000.00000000000.000000000.355329950.2994923860.055837560.76102300.00109025630.08569533
3IAA14 50.33924050.255696200.08354430.0097603290.00039371510.105272740.23126340.13918630...0.000000000.00000000.00000000000.000000000.016497460.0012690360.015228430.00000000.00076510910.01138349
4BIM1 50.53164560.316455700.21518990.0113795540.00046302630.131757440.10706640.06209850...0.073871410.00000000.00036858960.044039740.279187820.1890862940.090101520.94456560.00129193910.07964298
5GATA4 50.29113920.045569620.24556960.0017027570.00053500220.093269110.62955030.02783726...0.000000000.00000000.00000000000.000000000.000000000.0000000000.000000000.00000000.00000000000.00000000
6HAT2 50.00000000.000000000.00000000.0000000000.00000000000.000000000.00000000.00000000...0.072503420.95181120.00035522970.050539350.000000000.0000000000.000000000.00000000.00000000000.00000000
In [17]:
min_max_normalize <- function(data) {
  min_val <- min(data)
  max_val <- max(data)
  normalized_data <- (data - min_val) / (max_val - min_val)
  return(normalized_data)
}
In [18]:
summary(stem2pro$tri_betweenness_centrality)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
0.00000 0.00000 0.00000 0.03773 0.00000 0.98370 
In [19]:
summary(min_max_normalize(stem2pro$tri_betweenness_centrality))
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
0.00000 0.00000 0.00000 0.03835 0.00000 1.00000 
In [20]:
ncol(stem2pro)
62
In [21]:
stem2pro <- as.data.frame(cbind(stem2pro[,1],apply(stem2pro[,3:62],2,min_max_normalize)))
pro2trans <- as.data.frame(cbind(pro2trans[,1],apply(pro2trans[,3:62],2,min_max_normalize)))
trans2el <- as.data.frame(cbind(trans2el[,1],apply(trans2el[,3:62],2,min_max_normalize)))
el2el <- as.data.frame(cbind(el2el[,1],apply(el2el[,3:62],2,min_max_normalize)))
el2mat <- as.data.frame(cbind(el2mat[,1],apply(el2mat[,3:62],2,min_max_normalize)))
In [22]:
dat <- stem2pro %>%
full_join(pro2trans, by = "V1") %>%
full_join(trans2el, by = "V1") %>%
full_join(el2el, by = "V1") %>%
full_join(el2mat, by = "V1")
In [23]:
dat[is.na(dat)] <- 0
In [24]:
n <- c('atri_degree_centrality','atri_out_centrality','atri_in_centrality','atri_betweenness_centrality','atri_closeness_centrality','atri_eigenvector_centrality',
       'tri_degree_centrality','tri_out_centrality','tri_in_centrality','tri_betweenness_centrality','tri_closeness_centrality','tri_eigenvector_centrality',
       'lrc_degree_centrality','lrc_out_centrality','lrc_in_centrality','lrc_betweenness_centrality','lrc_closeness_centrality','lrc_eigenvector_centrality',
       'cor_degree_centrality','cor_out_centrality','cor_in_centrality','cor_betweenness_centrality','cor_closeness_centrality','cor_eigenvector_centrality',
       'end_degree_centrality','end_out_centrality','end_in_centrality','end_betweenness_centrality','end_closeness_centrality','end_eigenvector_centrality',
       'per_degree_centrality','per_out_centrality','per_in_centrality','per_betweenness_centrality','per_closeness_centrality','per_eigenvector_centrality',
       'pro_degree_centrality','pro_out_centrality','pro_in_centrality','pro_betweenness_centrality','pro_closeness_centrality','pro_eigenvector_centrality',
       'xyl_degree_centrality','xyl_out_centrality','xyl_in_centrality','xyl_betweenness_centrality','xyl_closeness_centrality','xyl_eigenvector_centrality',
       'phl_degree_centrality','phl_out_centrality','phl_in_centrality','phl_betweenness_centrality','phl_closeness_centrality','phl_eigenvector_centrality',
       'col_degree_centrality','col_out_centrality','col_in_centrality','col_betweenness_centrality','col_closeness_centrality','col_eigenvector_centrality')
In [25]:
colnames(dat) <- c("TF",gsub("$","_1",n), gsub("$","_2",n),gsub("$","_3",n),gsub("$","_4",n),gsub("$","_5",n))
In [26]:
GeneID <- wanted_TFs$GeneID[match(dat$TF, wanted_TFs$Name)]
In [27]:
dat <- cbind(GeneID, dat)
In [28]:
head(dat)
A data.frame: 6 x 302
GeneIDTFatri_degree_centrality_1atri_out_centrality_1atri_in_centrality_1atri_betweenness_centrality_1atri_closeness_centrality_1atri_eigenvector_centrality_1tri_degree_centrality_1tri_out_centrality_1...phl_in_centrality_5phl_betweenness_centrality_5phl_closeness_centrality_5phl_eigenvector_centrality_5col_degree_centrality_5col_out_centrality_5col_in_centrality_5col_betweenness_centrality_5col_closeness_centrality_5col_eigenvector_centrality_5
<chr><chr><chr><chr><chr><chr><chr><chr><chr><chr>...<chr><chr><chr><chr><chr><chr><chr><chr><chr><chr>
1AT1G08880H2AXA 0.2805587892898720.2769953051643190.2379110251450680.0408833325881880.77982289908458 0.6380160123688320.2864721485411140.147186147186147 ...0.01615271659324520 0.5331869128049 0.09177899284957290.0385462555066079 0.0127931769722815 0.061965811965812 0.005944374140134020.6446095230786350.182176552700344
2AT4G16780HB-2 0.7124563445867290.4084507042253520.8471953578336560.88525785755801 0.9757854702196460.9499271364382320.2466843501326260.0432900432900433...0 0 0 0 0 0 0 0 0 0
3AT4G36620GATA19 0.7112922002328290.8896713615023470.4487427466150870.9901333437653690.9496103044486850.9348279557744410.2148541114058360.142857142857143 ...0 0 0 0 0 0 0 0 0 0
4AT1G51060HTA10 0.3201396973224680.3145539906103290.2727272727272730.5644671837975590.7980642979392210.6760416792891660.3262599469496020.177489177489178 ...0.02202643171806170 0.5680279112679580.120142431316983 0.007709251101321590.002132196162046910.01282051282051280 0.4835516619933310.0541577050018262
5AT1G54690GAMMA-H2AX0.4097788125727590.5281690140845070.2456479690522240.8712304958197340.8268234930680530.7327535740212710.70026525198939 0.692640692640693 ...0 0 0 0 0 0 0 0 0 0
6AT2G21060GRP2B 0.2374854481955760.2676056338028170.1740812379110250.9040439039656640.8081254808258250.5780305363987320 0 ...0.110132158590308 0.003849101025020270.8078712078442270.612066867831852 0.009911894273127750.004264392324093820.014957264957265 0 0.4597178365828510.0640027480741151
In [29]:
numz <- function(x){
    sum(x==0)/length(x)
}
In [30]:
dat$combined_score <- min_max_normalize(rowSums(apply(dat[,grep("centrality",colnames(dat))],2,as.numeric)))
dat$celltype_specificity <- min_max_normalize(apply(apply(dat[,grep("centrality",colnames(dat))],2,as.numeric),1,numz))
dat$weighted_score <- dat$combined_score + dat$celltype_specificity
dat <- dat %>% arrange(desc(weighted_score))
In [31]:
head(dat)
A data.frame: 6 x 305
GeneIDTFatri_degree_centrality_1atri_out_centrality_1atri_in_centrality_1atri_betweenness_centrality_1atri_closeness_centrality_1atri_eigenvector_centrality_1tri_degree_centrality_1tri_out_centrality_1...phl_eigenvector_centrality_5col_degree_centrality_5col_out_centrality_5col_in_centrality_5col_betweenness_centrality_5col_closeness_centrality_5col_eigenvector_centrality_5combined_scorecelltype_specificityweighted_score
<chr><chr><chr><chr><chr><chr><chr><chr><chr><chr>...<chr><chr><chr><chr><chr><chr><chr><dbl><dbl><dbl>
1AT5G24800BZIP9 0 0 0 0 0 0 0 0 ...0.965592719930867 0000000.77206470.58222221.354287
2AT3G43430AT3G434300 0 0 0 0 0 0 0 ...0.390917063818791 0000000.92219860.42222221.344421
3AT2G45050GATA2 0.8288707799767170.9953051643192490.557059961315280.5787152948540260.9843097133194630.9796866423308020.8381962864721480.961038961038961...0 0000000.87635360.43111111.307465
4AT5G13910LEP 0 0 0 0 0 0 0.10079575596817 0.155844155844156...0 0000001.00000000.30666671.306667
5AT1G66230MYB20 0 0 0 0 0 0 0 0 ...0.06064892252284140000000.79506830.48444441.279513
6AT1G07640OBP2 0 0 0 0 0 0 0 0 ...0.982494065594694 0000000.56642950.68000001.246430
In [32]:
write.csv(dat,"TF_GRN_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=FALSE)
In [33]:
dat_genesys <- dat

Load GRN centrality scores for each transition (Linear Interaction Matrix, LIMA) (scRNAseq)¶

In [34]:
stem2pro <- read.csv("./scRNAseq_TF_GRN_centrality_t0-t1_zscore3.csv")
pro2trans <- read.csv("./scRNAseq_TF_GRN_centrality_t1-t3_zscore3.csv")
trans2el <- read.csv("./scRNAseq_TF_GRN_centrality_t3-t5_zscore3.csv")
el2el <- read.csv("./scRNAseq_TF_GRN_centrality_t5-t7_zscore3.csv")
el2mat <- read.csv("./scRNAseq_TF_GRN_centrality_t7-t9_zscore3.csv")
In [35]:
head(stem2pro)
A data.frame: 6 x 62
Xtf_occuranceatri_degree_centralityatri_out_centralityatri_in_centralityatri_betweenness_centralityatri_closeness_centralityatri_eigenvector_centralitytri_degree_centralitytri_out_centrality...phl_in_centralityphl_betweenness_centralityphl_closeness_centralityphl_eigenvector_centralitycol_degree_centralitycol_out_centralitycol_in_centralitycol_betweenness_centralitycol_closeness_centralitycol_eigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1BBX29 100.24731180.053763440.193548390.00244181670.00027799490.076341880.110062890.006289308...0.089141000.03601949101.067095e-040.120472890.42091840.14030610.280612244.642662e-040.00021091700.06890260
2ATWHY2 100.32526880.290322580.034946240.00087673540.00031266350.087842700.103773580.081761006...0.030794170.00027626348.076810e-050.040413590.12755100.07525510.052295923.810241e-030.00017212670.03419012
3HAT1 100.27956990.112903230.166666670.00923832710.00028217860.079546670.078616350.003144654...0.129659640.01880433181.094541e-040.138461710.35586730.11607140.239795922.687857e-040.00020974240.06503697
4HMGB5 100.72043010.521505380.198924730.06580587200.00029741420.130503510.345911950.248427673...0.116693680.00032888511.050922e-040.067510470.43112240.15688780.274234693.502359e-040.00021400650.07247327
5AT4G25210100.13440860.037634410.096774190.00019563520.00026119160.051971950.044025160.009433962...0.048622370.00031836078.684771e-050.053194000.14413270.02551020.118622456.516016e-060.00018540910.03889094
6HB-2 100.56451610.094086020.470430110.03304060520.00034682050.112206010.377358490.015723270...0.358184760.20025416241.248236e-040.156788721.16071430.41071430.750000007.682383e-030.00024196950.10843956
In [36]:
head(pro2trans)
A data.frame: 6 x 62
Xtf_occuranceatri_degree_centralityatri_out_centralityatri_in_centralityatri_betweenness_centralityatri_closeness_centralityatri_eigenvector_centralitytri_degree_centralitytri_out_centrality...phl_in_centralityphl_betweenness_centralityphl_closeness_centralityphl_eigenvector_centralitycol_degree_centralitycol_out_centralitycol_in_centralitycol_betweenness_centralitycol_closeness_centralitycol_eigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1HMGA 80.231854840.137096770.094758060.0156687853.412046e-050.089956260.054237290.010169492...0.368583161.410781e-030.00044419780.090355020.030612240.014739230.0158730160.00000000000.00012644950.01336338
2HTA2 80.207661290.034274190.173387100.0082070713.612809e-050.080601760.047457630.005084746...0.147843946.074694e-030.00039693720.047665100.056689340.048752830.0079365080.00000000000.00011971370.02249220
3H2AXA 80.294354840.177419350.116935480.8591845883.461035e-050.098148930.115254240.020338983...0.104722790.000000e+000.00037904510.039862050.126984130.089569160.0374149660.00064217890.00015075300.04020922
4HAT1 70.070564520.020161290.050403230.0010263932.769404e-050.036259400.010169490.001694915...0.100616022.479682e-040.00036531500.045064190.000000000.000000000.0000000000.00000000000.00000000000.00000000
5AT4G3041070.000000000.000000000.000000000.0000000000.000000e+000.000000000.320338980.279661017...0.045174542.110368e-060.00030147580.029961030.000000000.000000000.0000000000.00000000000.00000000000.00000000
6GATA15 70.120967740.084677420.036290320.0201938742.927206e-050.054401490.128813560.018644068...0.099589320.000000e+000.00037348960.038800900.000000000.000000000.0000000000.00000000000.00000000000.00000000
In [37]:
head(trans2el)
A data.frame: 6 x 62
Xtf_occuranceatri_degree_centralityatri_out_centralityatri_in_centralityatri_betweenness_centralityatri_closeness_centralityatri_eigenvector_centralitytri_degree_centralitytri_out_centrality...phl_in_centralityphl_betweenness_centralityphl_closeness_centralityphl_eigenvector_centralitycol_degree_centralitycol_out_centralitycol_in_centralitycol_betweenness_centralitycol_closeness_centralitycol_eigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1UPB1 70.538931300.5129770990.025954200.0332422910.00022191470.160249400.166666670.151162791...0.098729230.0110769330.00039175880.0554770520.0052287580.001307190.0039215690.000000e+000.00019377170.003017745
2ARF9 70.000000000.0000000000.000000000.0000000000.00000000000.000000000.000000000.000000000...0.032258060.1005953100.00028983370.0260062150.0535947710.001307190.0522875821.710981e-060.00031800170.017173520
3BZIP61 70.105343510.0244274810.080916030.0014496810.00018882810.069690930.094961240.003875969...0.111436950.0037369470.00039685680.0490839550.0000000000.000000000.0000000000.000000e+000.00000000000.000000000
4AT4G3041060.453435110.4320610690.021374050.0183976470.00021895950.142301600.598837210.472868217...0.045943300.0000000000.00034038940.0305403320.0000000000.000000000.0000000000.000000e+000.00000000000.000000000
5HAT22 60.000000000.0000000000.000000000.0000000000.00000000000.000000000.000000000.000000000...0.050830890.5066905400.00028821570.0287015840.1032679740.079738560.0235294123.079766e-050.00025741700.030739013
6H2AXA 60.058015270.0045801530.053435110.0000000000.00014800420.047849420.096899220.005813953...0.013685240.0000000000.00023134310.0099729830.0928104580.043137250.0496732031.356808e-030.00028844270.028117518
In [38]:
head(el2el)
A data.frame: 6 x 62
Xtf_occuranceatri_degree_centralityatri_out_centralityatri_in_centralityatri_betweenness_centralityatri_closeness_centralityatri_eigenvector_centralitytri_degree_centralitytri_out_centrality...phl_in_centralityphl_betweenness_centralityphl_closeness_centralityphl_eigenvector_centralitycol_degree_centralitycol_out_centralitycol_in_centralitycol_betweenness_centralitycol_closeness_centralitycol_eigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1RD26 80.425891180.365853660.0600375231.403638e-010.00029461910.118145610.135198140.09324009...0.055432372.830066e-050.00032529770.051445670.016602810.011494250.0051085573.592975e-050.00021655900.008456652
2IAA28 80.103189490.084427770.0187617262.257050e-030.00022853640.046223730.023310020.01165501...0.145232825.191325e-030.00040772020.083307950.000000000.000000000.0000000000.000000e+000.00000000000.000000000
3RAV1 70.155722330.140712950.0150093810.000000e+000.00023428520.063013040.067599070.03729604...0.043237256.152317e-060.00033847140.038996020.172413790.085568330.0868454669.390729e-040.00030181610.050018984
4AT5G5178070.037523450.035647280.0018761733.392628e-030.00021742860.019194950.034965030.02331002...0.074279385.336519e-030.00034688740.042469250.000000000.000000000.0000000000.000000e+000.00000000000.000000000
5ARR6 70.523452160.499061910.0243902446.424128e-010.00031683220.134664340.153846150.11888112...0.057649673.210279e-030.00034301300.033548060.033205620.024265640.0089399744.605540e-040.00018417840.014827200
6HAT22 70.093808630.069418390.0243902443.526640e-060.00022119320.044508100.375291380.34965035...0.004434594.499115e-010.00024999090.017138400.155810980.054916990.1008939971.469853e-040.00032845820.049621261
In [39]:
head(el2mat)
A data.frame: 6 x 62
Xtf_occuranceatri_degree_centralityatri_out_centralityatri_in_centralityatri_betweenness_centralityatri_closeness_centralityatri_eigenvector_centralitytri_degree_centralitytri_out_centrality...phl_in_centralityphl_betweenness_centralityphl_closeness_centralityphl_eigenvector_centralitycol_degree_centralitycol_out_centralitycol_in_centralitycol_betweenness_centralitycol_closeness_centralitycol_eigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
1AT5G5715070.070663810.023554600.047109211.838049e-050.00022710200.042571090.000000000.000000000...0.056372550.00098339950.00037058200.044610170.013227510.0079365080.0052910055.781562e-050.00014942900.00619152
2HB-1 70.117773020.070663810.047109219.236199e-040.00019765040.053631120.060606060.035984848...0.053921570.00082701790.00036248310.048374570.228835980.0992063490.1296296308.269386e-040.00032961810.06256898
3KNAT7 70.481798720.237687370.244111353.569354e-010.00027325580.127984880.017045450.009469697...0.000000000.00000000000.00000000000.000000000.228835980.1269841270.1018518521.228144e-030.00029054280.06016443
4WLIM1 70.154175590.109207710.044967885.652002e-030.00023720440.061079450.100378790.066287879...0.063725490.00213821730.00038270760.052748860.000000000.0000000000.0000000000.000000e+000.00000000000.00000000
5HAT22 70.092077090.068522480.023554602.109162e-030.00023210570.047757750.522727270.346590909...0.011029410.00000000000.00022106930.014374580.201058200.0912698410.1097883601.245664e-030.00032928060.05612659
6RD26 70.543897220.342612420.201284802.060913e-010.00029029540.137669100.308712120.164772727...0.019607840.02481504870.00023239000.027798560.029100530.0105820110.0185185194.029574e-050.00018043970.01076868
In [40]:
stem2pro <- as.data.frame(cbind(stem2pro[,1],apply(stem2pro[,3:62],2,min_max_normalize)))
pro2trans <- as.data.frame(cbind(pro2trans[,1],apply(pro2trans[,3:62],2,min_max_normalize)))
trans2el <- as.data.frame(cbind(trans2el[,1],apply(trans2el[,3:62],2,min_max_normalize)))
el2el <- as.data.frame(cbind(el2el[,1],apply(el2el[,3:62],2,min_max_normalize)))
el2mat <- as.data.frame(cbind(el2mat[,1],apply(el2mat[,3:62],2,min_max_normalize)))
In [41]:
dat <- stem2pro %>%
full_join(pro2trans, by = "V1") %>%
full_join(trans2el, by = "V1") %>%
full_join(el2el, by = "V1") %>%
full_join(el2mat, by = "V1")
In [42]:
dat[is.na(dat)] <- 0
In [43]:
n <- c('atri_degree_centrality','atri_out_centrality','atri_in_centrality','atri_betweenness_centrality','atri_closeness_centrality','atri_eigenvector_centrality',
       'tri_degree_centrality','tri_out_centrality','tri_in_centrality','tri_betweenness_centrality','tri_closeness_centrality','tri_eigenvector_centrality',
       'lrc_degree_centrality','lrc_out_centrality','lrc_in_centrality','lrc_betweenness_centrality','lrc_closeness_centrality','lrc_eigenvector_centrality',
       'cor_degree_centrality','cor_out_centrality','cor_in_centrality','cor_betweenness_centrality','cor_closeness_centrality','cor_eigenvector_centrality',
       'end_degree_centrality','end_out_centrality','end_in_centrality','end_betweenness_centrality','end_closeness_centrality','end_eigenvector_centrality',
       'per_degree_centrality','per_out_centrality','per_in_centrality','per_betweenness_centrality','per_closeness_centrality','per_eigenvector_centrality',
       'pro_degree_centrality','pro_out_centrality','pro_in_centrality','pro_betweenness_centrality','pro_closeness_centrality','pro_eigenvector_centrality',
       'xyl_degree_centrality','xyl_out_centrality','xyl_in_centrality','xyl_betweenness_centrality','xyl_closeness_centrality','xyl_eigenvector_centrality',
       'phl_degree_centrality','phl_out_centrality','phl_in_centrality','phl_betweenness_centrality','phl_closeness_centrality','phl_eigenvector_centrality',
       'col_degree_centrality','col_out_centrality','col_in_centrality','col_betweenness_centrality','col_closeness_centrality','col_eigenvector_centrality')
In [44]:
colnames(dat) <- c("TF",gsub("$","_1",n), gsub("$","_2",n),gsub("$","_3",n),gsub("$","_4",n),gsub("$","_5",n))
In [45]:
GeneID <- wanted_TFs$GeneID[match(dat$TF, wanted_TFs$Name)]
In [46]:
dat <- cbind(GeneID, dat)
In [47]:
head(dat)
A data.frame: 6 x 302
GeneIDTFatri_degree_centrality_1atri_out_centrality_1atri_in_centrality_1atri_betweenness_centrality_1atri_closeness_centrality_1atri_eigenvector_centrality_1tri_degree_centrality_1tri_out_centrality_1...phl_in_centrality_5phl_betweenness_centrality_5phl_closeness_centrality_5phl_eigenvector_centrality_5col_degree_centrality_5col_out_centrality_5col_in_centrality_5col_betweenness_centrality_5col_closeness_centrality_5col_eigenvector_centrality_5
<chr><chr><chr><chr><chr><chr><chr><chr><chr><chr>...<chr><chr><chr><chr><chr><chr><chr><chr><chr><chr>
1AT5G54470BBX29 0.2110091743119270.05649717514124290.194070080862534 0.00792493650644342 0.6805943610712230.4960281623288260.114754098360656 0.00677966101694915...0.00287356321839080.189308951096575 0.4585399964968920.04827096317703970.006219765031098830.005427408412483040.0070422535211267600.3867812359878340.0414438766680971
2AT1G71260ATWHY2 0.2775229357798170.305084745762712 0.03504043126684640.00284545198005832 0.7654709803398860.57075423509666 0.108196721311475 0.088135593220339 ...0.02442528735632184.58083105436988e-060.5946868403225690.140802047799801 0 0 0 00 0
3AT4G17460HAT1 0.2385321100917430.11864406779661 0.16711590296496 0.0299830683849121 0.69083699073779 0.5168511641895860.08196721311475410.00338983050847458...0 0 0 0 0 0 0 00 0
4AT4G35570HMGB5 0.6146788990825690.548022598870057 0.199460916442049 0.21357351142884 0.7281370962438690.8479410814439420.360655737704918 0.267796610169492 ...0.03879310344827590 0.67922660278798 0.146857216289362 0 0 0 00 0
5AT4G25210AT4G252100.1146788990825690.03954802259887010.09703504043126680.0006349355657981380.6394560254266850.3376855337560120.04590163934426230.0101694915254237 ...0.04597701149425293.05388736957992e-060.6880569273507870.233155293081824 0.0055286800276434 0.001356852103120760.0098591549295774700.4271695571407150.0415273011938073
6AT4G16780HB-2 0.4816513761467890.09887005649717510.471698113207547 0.107233562223685 0.8490950446209690.72905381296083 0.39344262295082 0.0169491525423729 ...0 0 0 0 0 0 0 00 0
In [48]:
dat$combined_score <- min_max_normalize(rowSums(apply(dat[,grep("centrality",colnames(dat))],2,as.numeric)))
dat$celltype_specificity <- min_max_normalize(apply(apply(dat[,grep("centrality",colnames(dat))],2,as.numeric),1,numz))
dat$weighted_score <- dat$combined_score + dat$celltype_specificity
dat <- dat %>% arrange(desc(weighted_score))
In [49]:
head(dat)
A data.frame: 6 x 305
GeneIDTFatri_degree_centrality_1atri_out_centrality_1atri_in_centrality_1atri_betweenness_centrality_1atri_closeness_centrality_1atri_eigenvector_centrality_1tri_degree_centrality_1tri_out_centrality_1...phl_eigenvector_centrality_5col_degree_centrality_5col_out_centrality_5col_in_centrality_5col_betweenness_centrality_5col_closeness_centrality_5col_eigenvector_centrality_5combined_scorecelltype_specificityweighted_score
<chr><chr><chr><chr><chr><chr><chr><chr><chr><chr>...<chr><chr><chr><chr><chr><chr><chr><dbl><dbl><dbl>
1AT2G45050GATA2 0.7408256880733950.8361581920903960.07277628032345010.1646834728623840.8988101777421230.9237954345250791 1 ...0 0 0 0 0 0 0 0.92185660.58506221.506919
2AT5G24800BZIP9 0 0 0 0 0 0 0 0 ...0.893177964282472 0 0 0 0 0 0 0.77143030.70124481.472675
3AT3G43430AT3G434300 0 0 0 0 0 0 0 ...0.476672700564731 0 0 0 0 0 0 0.90132020.53941911.440739
4AT5G13910LEP 0 0 0 0 0 0 0 0 ...0.02486710806372470 0 0 0 0 0 0.79059200.60580911.396401
5AT1G75710BRON 0.8096330275229360.42090395480226 0.549865229110512 0.3051218135641050.8528083779176170.9036055824126130.3803278688524590.00677966101694915...0 0.04008293020041470.00678426051560380.07464788732394370.0005248130353561540.7393889692261330.2369493896769980.75746240.63485481.392317
6AT4G32880HB-8 0 0 0 0 0 0 0 0 ...0.146825077321862 0 0 0 0 0 0 0.75882650.62655601.385383
In [50]:
write.csv(dat,"scRNAseq_TF_GRN_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=FALSE)
In [51]:
dat_raw <- dat

GO terms (Prepare GS)¶

In [52]:
gene_list <- read.table('./gene_list_1108.csv', sep=",", header = TRUE)
In [53]:
exptf <- intersect(gene_list$features, wanted_TFs$GeneID)
length(exptf)
1495
In [54]:
sfun <- read.csv('string_functional_annotations.tsv', sep="\t", header=TRUE)
sann <- read.csv('string_protein_annotations.tsv', sep="\t", header=TRUE)
In [55]:
gsgo1 <- unique(sfun[grep('root|xylem|phloem|procambium|pericycle|vascular|vasculature|stele|tracheary|sieve|trichoblast|atrichoblast|epidermis|epidermal tissue|lateral root cap|root hair|trichome|cortex|endodermis|ground tissue|columella|quiescent center',sfun$term.description, ignore.case=TRUE),]$X.node)
gsgo2 <- unique(sann[grep('root|xylem|phloem|procambium|pericycle|vascular|vasculature|stele|tracheary|sieve|trichoblast|atrichoblast|epidermis|epidermal tissue|lateral root cap|root hair|trichome|cortex|endodermis|ground tissue|columella|quiescent center',sann$domain_summary_url, ignore.case=TRUE),]$X.node)
gsgo <- sort(unique(c(gsgo1, gsgo2)))
In [56]:
#write.csv(data.frame(GeneID=gsgo),"./Gold_Standard_Root_TF_StringDB.csv", quote=FALSE, row.names=FALSE)
In [56]:
length(gsgo)
gsgo
209
  1. 'A0A1I9LNX5'
  2. 'AGL12'
  3. 'AGL16'
  4. 'AHK2'
  5. 'AHK3'
  6. 'AHK4'
  7. 'AIL5'
  8. 'AL6'
  9. 'ANL2'
  10. 'APL'
  11. 'ARF10'
  12. 'ARF16'
  13. 'ARF17'
  14. 'ARF19'
  15. 'ARF7'
  16. 'ARR1'
  17. 'ARR10'
  18. 'ARR12'
  19. 'ARR2'
  20. 'ATHB-13'
  21. 'ATHB-15'
  22. 'ATHB-23'
  23. 'ATHB-8'
  24. 'ATHB-X'
  25. 'ATX1-2'
  26. 'BEH1'
  27. 'BHLH12'
  28. 'BHLH155'
  29. 'BHLH2'
  30. 'BHLH32'
  31. 'BHLH48'
  32. 'BHLH54'
  33. 'BHLH66'
  34. 'BHLH69'
  35. 'BHLH82'
  36. 'BHLH83'
  37. 'BHLH85'
  38. 'BHLH86'
  39. 'BIB'
  40. 'BRM'
  41. 'BZIP19'
  42. 'BZIP23'
  43. 'BZR2'
  44. 'CHC1-2'
  45. 'CHR12'
  46. 'CHR23'
  47. 'CPC'
  48. 'CRF2'
  49. 'DAR2'
  50. 'DOF1.1'
  51. 'DOF2.2'
  52. 'DOF2.4'
  53. 'DOF3.2'
  54. 'DOF3.6'
  55. 'DOF5.1'
  56. 'DOF5.3'
  57. 'DOF5.6'
  58. 'DOT2'
  59. 'DPB'
  60. 'E2FB'
  61. 'EFM'
  62. 'ERF055'
  63. 'ERF104'
  64. 'ET2'
  65. 'ETC1'
  66. 'ETR1'
  67. 'F13K3.12'
  68. 'F24O1.3'
  69. 'F27L4.4'
  70. 'F2I11.230'
  71. 'FEZ'
  72. 'GAI'
  73. 'GALT2'
  74. 'GATA12'
  75. 'GATA23'
  76. 'GIF1'
  77. 'GIS3'
  78. 'GL2'
  79. 'GL3'
  80. 'GRF2-2'
  81. 'GRF3-2'
  82. 'GTL1'
  83. 'HAG1'
  84. 'HAT2'
  85. 'HAT4'
  86. 'HDG11'
  87. 'HDG12'
  88. 'HDG2'
  89. 'HDT1'
  90. 'HHO1'
  91. 'HHO2'
  92. 'HHO3'
  93. 'HHO6'
  94. 'HRS1'
  95. 'HSFA4C'
  96. 'IAA12'
  97. 'IAA14'
  98. 'IAA20'
  99. 'IAA28'
  100. 'IAA3'
  101. 'IAA31'
  102. 'IAA8'
  103. 'IDD4'
  104. 'IDD6'
  105. 'IWS1'
  106. 'JKD'
  107. 'JMJ14'
  108. 'JMJ25'
  109. 'JMJ30'
  110. 'JMJ32'
  111. 'K15E6.5'
  112. 'KAN1'
  113. 'KNAT7'
  114. 'KUA1'
  115. 'LBD15'
  116. 'LBD16'
  117. 'LBD18'
  118. 'LBD29'
  119. 'LBD3'
  120. 'LBD30'
  121. 'LBD4'
  122. 'LDL1'
  123. 'LEP'
  124. 'LHW'
  125. 'LRP1'
  126. 'MAMYB'
  127. 'MGP'
  128. 'MIF1'
  129. 'MTERF9'
  130. 'MYB12'
  131. 'MYB124'
  132. 'MYB20'
  133. 'MYB23'
  134. 'MYB32'
  135. 'MYB36'
  136. 'MYB43'
  137. 'MYB46'
  138. 'MYB52'
  139. 'MYB60'
  140. 'MYB61'
  141. 'MYB7'
  142. 'MYB83'
  143. 'MYB85'
  144. 'MYB86'
  145. 'MYB88'
  146. 'MYC3'
  147. 'MYC4'
  148. 'NAA10'
  149. 'NAC003'
  150. 'NAC005'
  151. 'NAC007'
  152. 'NAC010'
  153. 'NAC026'
  154. 'NAC030'
  155. 'NAC037'
  156. 'NAC043'
  157. 'NAC045'
  158. 'NAC056'
  159. 'NAC075'
  160. 'NAC076'
  161. 'NAC083'
  162. 'NAC084'
  163. 'NAC086'
  164. 'NAC101'
  165. 'NAC104'
  166. 'NAC105'
  167. 'NAC92'
  168. 'NUC'
  169. 'PKL'
  170. 'PLT1'
  171. 'PLT2'
  172. 'PRE3'
  173. 'Q1G3Q4_ARATH'
  174. 'RAP2-11'
  175. 'RAP2-12'
  176. 'RAV1'
  177. 'RBR1'
  178. 'REF6'
  179. 'REV'
  180. 'RGA'
  181. 'SCL22'
  182. 'SCL27'
  183. 'SCL6'
  184. 'SCR'
  185. 'SCRM'
  186. 'SHR'
  187. 'SMB'
  188. 'SOG1'
  189. 'T15F16.14'
  190. 'T2I1.110'
  191. 'TCP14'
  192. 'TCP15'
  193. 'TCP9'
  194. 'TCX2'
  195. 'TCX3'
  196. 'TRY'
  197. 'TSO1'
  198. 'TTG1'
  199. 'UPB1'
  200. 'WER'
  201. 'WIP2-2'
  202. 'WLIM2B'
  203. 'WOX14'
  204. 'WRKY13'
  205. 'WRKY44'
  206. 'WRKY75'
  207. 'ZFP5'
  208. 'ZFP6'
  209. 'ZFP8'
In [57]:
gsgo <- gsub(",.*$","",gsub("^.*ath:","",sann[match(gsgo, sann$X.node),]$other_names_and_aliases))
gsgo[which(gsgo=='831248')]='AT5G14000'
gsgo
  1. 'AT3G53680'
  2. 'AT1G71692'
  3. 'AT3G57230'
  4. 'AT5G35750'
  5. 'AT1G27320'
  6. 'AT2G01830'
  7. 'AT5G57390'
  8. 'AT2G02470'
  9. 'AT4G00730'
  10. 'AT1G79430'
  11. 'AT2G28350'
  12. 'AT4G30080'
  13. 'AT1G77850'
  14. 'AT1G19220'
  15. 'AT5G20730'
  16. 'AT3G16857'
  17. 'AT4G31920'
  18. 'AT2G25180'
  19. 'AT4G16110'
  20. 'AT1G69780'
  21. 'AT1G52150'
  22. 'AT1G26960'
  23. 'AT4G32880'
  24. 'AT1G70920'
  25. 'AT2G31650'
  26. 'AT3G50750'
  27. 'AT4G00480'
  28. 'AT2G31280'
  29. 'AT1G63650'
  30. 'AT3G25710'
  31. 'AT2G42300'
  32. 'AT1G27740'
  33. 'AT2G24260'
  34. 'AT4G30980'
  35. 'AT5G58010'
  36. 'AT1G66470'
  37. 'AT4G33880'
  38. 'AT5G37800'
  39. 'AT3G45260'
  40. 'AT2G46020'
  41. 'AT4G35040'
  42. 'AT2G16770'
  43. 'AT1G19350'
  44. 'AT5G14170'
  45. 'AT3G06010'
  46. 'AT5G19310'
  47. 'AT2G46410'
  48. 'AT4G23750'
  49. 'AT2G39830'
  50. 'AT1G07640'
  51. 'AT2G28810'
  52. 'AT2G37590'
  53. 'AT3G45610'
  54. 'AT3G55370'
  55. 'AT5G02460'
  56. 'AT5G60200'
  57. 'AT5G62940'
  58. 'AT5G16780'
  59. 'AT5G03415'
  60. 'AT5G22220'
  61. 'AT2G03500'
  62. 'AT1G36060'
  63. 'AT5G61600'
  64. 'AT5G56780'
  65. 'AT1G01380'
  66. 'AT1G66340'
  67. 'AT2G36720'
  68. 'AT1G62310'
  69. 'AT2G23780'
  70. 'AT5G11340'
  71. 'AT1G26870'
  72. 'AT1G14920'
  73. 'AT4G21060'
  74. 'AT5G25830'
  75. 'AT5G26930'
  76. 'AT5G28640'
  77. 'AT1G68360'
  78. 'AT1G79840'
  79. 'AT5G41315'
  80. 'AT4G37740'
  81. 'AT2G36400'
  82. 'AT1G33240'
  83. 'AT3G54610'
  84. 'AT5G47370'
  85. 'AT4G16780'
  86. 'AT1G73360'
  87. 'AT1G17920'
  88. 'AT1G05230'
  89. 'AT3G44750'
  90. 'AT3G25790'
  91. 'AT1G68670'
  92. 'AT1G25550'
  93. 'AT1G49560'
  94. 'AT1G13300'
  95. 'AT5G45710'
  96. 'AT1G04550'
  97. 'AT4G14550'
  98. 'AT2G46990'
  99. 'AT5G25890'
  100. 'AT1G04240'
  101. 'AT3G17600'
  102. 'AT2G22670'
  103. 'AT2G02080'
  104. 'AT1G14580'
  105. 'AT1G32130'
  106. 'AT5G03150'
  107. 'AT4G20400'
  108. 'AT3G07610'
  109. 'AT3G20810'
  110. 'AT3G45880'
  111. 'AT5G38840'
  112. 'AT5G16560'
  113. 'AT1G62990'
  114. 'AT5G47390'
  115. 'AT2G40470'
  116. 'AT2G42430'
  117. 'AT2G45420'
  118. 'AT3G58190'
  119. 'AT1G16530'
  120. 'AT4G00220'
  121. 'AT1G31320'
  122. 'AT1G62830'
  123. 'AT5G13910'
  124. 'AT2G27230'
  125. 'AT5G12330'
  126. 'AT5G45420'
  127. 'AT1G03840'
  128. 'AT1G74660'
  129. 'AT5G55580'
  130. 'AT2G47460'
  131. 'AT1G14350'
  132. 'AT1G66230'
  133. 'AT5G40330'
  134. 'AT4G34990'
  135. 'AT5G57620'
  136. 'AT5G16600'
  137. 'AT5G12870'
  138. 'AT1G17950'
  139. 'AT1G08810'
  140. 'AT1G09540'
  141. 'AT2G16720'
  142. 'AT3G08500'
  143. 'AT4G22680'
  144. 'AT5G26660'
  145. 'AT2G02820'
  146. 'AT5G46760'
  147. 'AT4G17880'
  148. 'AT5G13780'
  149. 'AT1G02220'
  150. 'AT1G02250'
  151. 'AT1G12260'
  152. 'AT1G28470'
  153. 'AT1G62700'
  154. 'AT1G71930'
  155. 'AT2G18060'
  156. 'AT2G46770'
  157. 'AT3G03200'
  158. 'AT3G15510'
  159. 'AT4G29230'
  160. 'AT4G36160'
  161. 'AT5G13180'
  162. 'AT5G14000'
  163. 'AT5G17260'
  164. 'AT5G62380'
  165. 'AT5G64530'
  166. 'AT5G66300'
  167. 'AT5G39610'
  168. 'AT5G44160'
  169. 'AT2G25170'
  170. 'AT3G20840'
  171. 'AT1G51190'
  172. 'AT1G74500'
  173. 'AT2G12646'
  174. 'AT5G19790'
  175. 'AT1G53910'
  176. 'AT1G13260'
  177. 'AT3G12280'
  178. 'AT3G48430'
  179. 'AT5G60690'
  180. 'AT2G01570'
  181. 'AT3G60630'
  182. 'AT2G45160'
  183. 'AT4G00150'
  184. 'AT3G54220'
  185. 'AT3G26744'
  186. 'AT4G37650'
  187. 'AT1G79580'
  188. 'AT1G25580'
  189. 'AT4G08455'
  190. 'AT5G07400'
  191. 'AT3G47620'
  192. 'AT1G69690'
  193. 'AT2G45680'
  194. 'AT4G14770'
  195. 'AT3G22760'
  196. 'AT5G53200'
  197. 'AT3G22780'
  198. 'AT5G24520'
  199. 'AT2G47270'
  200. 'AT5G14750'
  201. 'AT3G57670'
  202. 'AT3G55770'
  203. 'AT1G20700'
  204. 'AT4G39410'
  205. 'AT2G37260'
  206. 'AT5G13080'
  207. 'AT1G10480'
  208. 'AT1G67030'
  209. 'AT2G41940'
In [58]:
sann[which(sann$X.node=="HAT7"),]
A data.frame: 1 x 5
X.nodeidentifierdomain_summary_urlannotationother_names_and_aliases
<chr><chr><chr><chr><chr>
668HAT73702.Q00466Homeobox-leucine zipper protein HAT7; Probable transcription factor.https://smart.embl.de/smart/DDvec.cgi?smart=314:HOX(113|174)+831367,AT5G15150,ATHB-3,At5g15150,F8M21_40,HAT7,HAT7_ARATH,HB-3,HD-ZIP protein 7,HD-ZIP protein ATHB-3,Homeobox 3,Homeobox-leucine zipper protein,Homeobox-leucine zipper protein HAT7,Homeodomain transcription factor ATHB-3,Homeodomain-leucine zipper protein HAT7,NM_121519.3,NP_568309,NP_568309.2,Q00466,Q0WNS2,Q9LXG6,ath:AT5G15150
In [59]:
sann[grep("831248",sann$other_names_and_aliases, ignore.case = TRUE),]
A data.frame: 1 x 5
X.nodeidentifierdomain_summary_urlannotationother_names_and_aliases
<chr><chr><chr><chr><chr>
980NAC0843702.A0A1P8BAC2NAC domain containing protein 84.https://smart.embl.de/smart/DDvec.cgi?smart=262:Pfam_NAM(16|196)+831248,A0A1P8BAC2,A0A1P8BAC2_ARATH,At5g14000,MAC12.3,MAC12_3,NAC domain containing protein 84,NAC084,NM_001343305.1,NP_001330278.1,anac084
In [60]:
sfun <- read.csv('./functional_GS_root_unique.csv', sep=",", header=TRUE)
In [61]:
gsgo_miniex <- intersect(exptf, sfun$GeneID)
length(gsgo_miniex)
143
In [62]:
gsgo <- intersect(gsgo, gsgo_miniex)
In [63]:
length(gsgo)
140
In [64]:
gsgo
  1. 'AT1G71692'
  2. 'AT5G35750'
  3. 'AT1G27320'
  4. 'AT2G01830'
  5. 'AT5G57390'
  6. 'AT2G02470'
  7. 'AT4G00730'
  8. 'AT1G79430'
  9. 'AT2G28350'
  10. 'AT4G30080'
  11. 'AT1G77850'
  12. 'AT1G19220'
  13. 'AT5G20730'
  14. 'AT3G16857'
  15. 'AT4G31920'
  16. 'AT2G25180'
  17. 'AT4G16110'
  18. 'AT1G69780'
  19. 'AT1G52150'
  20. 'AT1G26960'
  21. 'AT4G32880'
  22. 'AT2G31650'
  23. 'AT4G00480'
  24. 'AT1G63650'
  25. 'AT3G25710'
  26. 'AT1G27740'
  27. 'AT2G24260'
  28. 'AT4G30980'
  29. 'AT5G58010'
  30. 'AT1G66470'
  31. 'AT4G33880'
  32. 'AT5G14170'
  33. 'AT3G06010'
  34. 'AT5G19310'
  35. 'AT2G46410'
  36. 'AT4G23750'
  37. 'AT2G39830'
  38. 'AT1G07640'
  39. 'AT2G37590'
  40. 'AT3G45610'
  41. 'AT5G02460'
  42. 'AT5G60200'
  43. 'AT5G62940'
  44. 'AT5G16780'
  45. 'AT5G22220'
  46. 'AT5G61600'
  47. 'AT5G56780'
  48. 'AT1G01380'
  49. 'AT1G66340'
  50. 'AT1G62310'
  51. 'AT5G11340'
  52. 'AT1G26870'
  53. 'AT1G14920'
  54. 'AT4G21060'
  55. 'AT5G25830'
  56. 'AT5G26930'
  57. 'AT1G68360'
  58. 'AT1G79840'
  59. 'AT5G41315'
  60. 'AT4G37740'
  61. 'AT2G36400'
  62. 'AT1G33240'
  63. 'AT3G54610'
  64. 'AT4G16780'
  65. 'AT1G73360'
  66. 'AT1G17920'
  67. 'AT1G05230'
  68. 'AT3G44750'
  69. 'AT1G13300'
  70. 'AT5G45710'
  71. 'AT1G04550'
  72. 'AT4G14550'
  73. 'AT2G46990'
  74. 'AT5G25890'
  75. 'AT3G17600'
  76. 'AT2G22670'
  77. 'AT2G02080'
  78. 'AT1G14580'
  79. 'AT5G03150'
  80. 'AT5G16560'
  81. 'AT1G62990'
  82. 'AT5G47390'
  83. 'AT2G40470'
  84. 'AT2G42430'
  85. 'AT2G45420'
  86. 'AT3G58190'
  87. 'AT4G00220'
  88. 'AT1G31320'
  89. 'AT1G62830'
  90. 'AT2G27230'
  91. 'AT5G12330'
  92. 'AT5G45420'
  93. 'AT1G03840'
  94. 'AT5G55580'
  95. 'AT1G14350'
  96. 'AT5G40330'
  97. 'AT5G57620'
  98. 'AT1G09540'
  99. 'AT2G02820'
  100. 'AT1G02250'
  101. 'AT1G12260'
  102. 'AT1G62700'
  103. 'AT1G71930'
  104. 'AT2G18060'
  105. 'AT3G03200'
  106. 'AT4G29230'
  107. 'AT4G36160'
  108. 'AT5G13180'
  109. 'AT5G17260'
  110. 'AT5G62380'
  111. 'AT5G64530'
  112. 'AT5G66300'
  113. 'AT5G39610'
  114. 'AT5G44160'
  115. 'AT2G25170'
  116. 'AT3G20840'
  117. 'AT1G51190'
  118. 'AT1G74500'
  119. 'AT2G12646'
  120. 'AT5G19790'
  121. 'AT1G53910'
  122. 'AT1G13260'
  123. 'AT3G12280'
  124. 'AT5G60690'
  125. 'AT3G60630'
  126. 'AT2G45160'
  127. 'AT4G00150'
  128. 'AT3G54220'
  129. 'AT1G79580'
  130. 'AT2G45680'
  131. 'AT5G53200'
  132. 'AT5G24520'
  133. 'AT2G47270'
  134. 'AT5G14750'
  135. 'AT3G57670'
  136. 'AT1G20700'
  137. 'AT5G13080'
  138. 'AT1G10480'
  139. 'AT1G67030'
  140. 'AT2G41940'
In [66]:
write.csv(data.frame(GeneID=gsgo),"./Gold_Standard_Root_TF_MINI_EX_StringDB.csv", quote=FALSE, row.names=FALSE)

R50¶

In [67]:
r50 <- 70
numz <- function(x){
    sum(x==0)/length(x)
}

LIMA (GeneSys)¶

In [68]:
genesys <- dat_genesys
In [69]:
run_r50_genesys <- function(x){
    genesys$combined_score <- min_max_normalize(rowSums(apply(genesys[,grep(x,colnames(genesys))],2,as.numeric)))
    genesys <- genesys %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(genesys))){
        if (genesys$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [70]:
## all cell type : in centrality + celltype & dev stage specificity
#dat$combined_score <- min_max_normalize(rowSums(apply(dat[,grep("in_centrality",colnames(dat))],2,as.numeric)))
#dat$celltype_specificity <- min_max_normalize(apply(apply(dat[,grep("in_centrality",colnames(dat))],2,as.numeric),1,numz))
#dat$weighted_score <- dat$combined_score + dat$celltype_specificity
#dat <- dat %>% arrange(desc(weighted_score))

#count <- 0
#for (i in seq(nrow(dat))){
#    if (dat$GeneID[i] %in% gsgo){
#        count <- count +1
#        if (count == r50){
#            print(i)
#            break
#        }
#    }
#}

LIMA (scRNAseq)¶

In [71]:
raw <- dat_raw
In [72]:
run_r50_scRNAseq <- function(x){
    raw$combined_score <- min_max_normalize(rowSums(apply(raw[,grep(x,colnames(raw))],2,as.numeric)))
    raw <- raw %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(raw))){
        if (raw$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}

CellOracle¶

In [73]:
prepros <- function(x){
    dat <- read.csv(x)
    #dat <- dat %>% filter(role=="Connector Hub") 
    dat <- dat[,c(1, grep("centrality",colnames(dat)), 11)]
    return(dat)
}
In [74]:
atri <- prepros("../celloracle/atrichoblast_X_root_integrated_celloracle_gene_score_iGRN.csv")
tri <- prepros("../celloracle/trichoblast_X_root_integrated_celloracle_gene_score_iGRN.csv")
lrc <- prepros("../celloracle/lrc_X_root_integrated_celloracle_gene_score_iGRN.csv")
cor <- prepros("../celloracle/cortex_X_root_integrated_celloracle_gene_score_iGRN.csv")
end <- prepros("../celloracle/endodermis_X_root_integrated_celloracle_gene_score_iGRN.csv")
per <- prepros("../celloracle/pericycle_X_root_integrated_celloracle_gene_score_iGRN.csv")
pro <- prepros("../celloracle/procambium_X_root_integrated_celloracle_gene_score_iGRN.csv")
xyl <- prepros("../celloracle/xylem_X_root_integrated_celloracle_gene_score_iGRN.csv")
phl <- prepros("../celloracle/phloem_X_root_integrated_celloracle_gene_score_iGRN.csv")
col <- prepros("../celloracle/columella_X_root_integrated_celloracle_gene_score_iGRN.csv")
In [75]:
dat <- rbind(atri, tri, lrc, cor, end, per, pro, xyl, phl, col)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all), 
                                  in_centrality = min_max_normalize(degree_centrality_in), 
                                  out_centrality = min_max_normalize(degree_centrality_out),
                                 betweenness_centrality = min_max_normalize(betweenness_centrality),
                                 #closeness_centrality = min_max_normalize(closeness_centrality),
                                 eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality), 
                                  in_centrality = sum(in_centrality), 
                                  out_centrality = sum(out_centrality),
                                 betweenness_centrality = sum(betweenness_centrality),
                                 #closeness_centrality = sum(closeness_centrality),
                                 eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:6],2,min_max_normalize))
In [76]:
head(dat)
A data.frame: 6 x 6
GeneIDdegree_centralityin_centralityout_centralitybetweenness_centralityeigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl>
1AT1G010100.1490770520.114370380.129447790.0323904820.138668256
2AT1G010300.0340963710.086109450.011251460.0040738770.030816983
3AT1G011600.0025476370.010249300.000000000.0000000000.001710741
4AT1G012600.2282708570.113421760.209697500.0959007560.185542460
5AT1G013500.0455244260.153624580.000000000.0000000000.031035276
6AT1G013800.0421030430.105340450.026438300.0019883560.051799125
In [77]:
celloracle_scRNAseq <- dat
In [78]:
atri <- prepros("../celloracle/atrichoblast_P_root_integrated_celloracle_gene_score_iGRN.csv")
tri <- prepros("../celloracle/trichoblast_P_root_integrated_celloracle_gene_score_iGRN.csv")
lrc <- prepros("../celloracle/lrc_P_root_integrated_celloracle_gene_score_iGRN.csv")
cor <- prepros("../celloracle/cortex_P_root_integrated_celloracle_gene_score_iGRN.csv")
end <- prepros("../celloracle/endodermis_P_root_integrated_celloracle_gene_score_iGRN.csv")
per <- prepros("../celloracle/pericycle_P_root_integrated_celloracle_gene_score_iGRN.csv")
pro <- prepros("../celloracle/procambium_P_root_integrated_celloracle_gene_score_iGRN.csv")
xyl <- prepros("../celloracle/xylem_P_root_integrated_celloracle_gene_score_iGRN.csv")
phl <- prepros("../celloracle/phloem_P_root_integrated_celloracle_gene_score_iGRN.csv")
col <- prepros("../celloracle/columella_P_root_integrated_celloracle_gene_score_iGRN.csv")
In [79]:
dat <- rbind(atri, tri, lrc, cor, end, per, pro, xyl, phl, col)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all), 
                                  in_centrality = min_max_normalize(degree_centrality_in), 
                                  out_centrality = min_max_normalize(degree_centrality_out),
                                 betweenness_centrality = min_max_normalize(betweenness_centrality),
                                 #closeness_centrality = min_max_normalize(closeness_centrality),
                                 eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality), 
                                  in_centrality = sum(in_centrality), 
                                  out_centrality = sum(out_centrality),
                                 betweenness_centrality = sum(betweenness_centrality),
                                 #closeness_centrality = sum(closeness_centrality),
                                 eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:6],2,min_max_normalize))
In [80]:
head(dat)
A data.frame: 6 x 6
GeneIDdegree_centralityin_centralityout_centralitybetweenness_centralityeigenvector_centrality
<chr><dbl><dbl><dbl><dbl><dbl>
1AT1G010100.14399320220.0792247880.120123980.0114748230.1118648002
2AT1G010300.04110477920.0698284170.012969140.0069624970.0376800705
3AT1G011600.00076337510.0020054980.000000000.0000000000.0006013235
4AT1G012600.16357277750.0113809660.203124060.0564231970.1574869973
5AT1G013500.01183168980.0292957490.000000000.0000000000.0084215688
6AT1G013800.06251041410.1129630580.031448360.0030735850.0595090922
In [81]:
celloracle_GeneSys <- dat
In [82]:
run_r50_celloracle <- function(x, dat){
    celloracle <- dat
    celloracle$combined_score <- celloracle[,grep(x,colnames(celloracle))]
    celloracle <- celloracle %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(celloracle))){
        if (celloracle$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}

Differential Expression Analysis¶

In [83]:
de_scRNAseq <- read.csv("Input_X_root_markers_ROC.csv")
In [84]:
de_scRNAseq <- de_scRNAseq %>% arrange(pct.diff_rank) %>% arrange(avg_diff_rank)%>% arrange(myAUC_rank)%>% arrange(combined_rank)
In [85]:
## Remove those not present in the dataset
de_scRNAseq <- de_scRNAseq[!is.na(match(de_scRNAseq$gene,exptf)),]
In [86]:
dat <- de_scRNAseq %>% group_by(gene) %>% reframe(myAUC_rank = mean(myAUC_rank),avg_diff_rank = mean(avg_diff_rank))
dat <- dat %>% arrange(myAUC_rank)
colnames(dat) <- c("GeneID","myAUC_rank","avg_diff_rank")
In [87]:
de_scRNAseq <- dat
In [88]:
de <- read.csv("GeneSys_P_root_markers_ROC.csv")
In [89]:
de <- de %>% arrange(pct.diff_rank) %>% arrange(avg_diff_rank)%>% arrange(myAUC_rank)%>% arrange(combined_rank)
In [90]:
## Remove those not present in the dataset
de <- de[!is.na(match(de$gene,exptf)),]
In [91]:
head(de)
A data.frame: 6 x 15
myAUCavg_diffpoweravg_log2FCpct.1pct.2clustergeneNamenpct.diffpct.diff_rankavg_diff_rankmyAUC_rankcombined_rank
<dbl><dbl><dbl><dbl><int><int><chr><chr><chr><int><int><int><int><int><int>
110.9830.70563820.9661.019695111Atrichoblast_t2AT2G45050GATA2 901 311
150.9750.61557940.9500.887127611Columella_t8 AT2G43000JUB1 901 411
170.9820.67356580.9640.969355411Columella_t9 AT2G43000JUB1 902 411
180.9910.91299820.9821.320146411Trichoblast_t9 AT5G58010BHLH82 603 411
300.9920.90111930.9841.294640711Xylem_t9 AT1G62990KNAT7 5032311
330.9790.82858990.9581.196926711Phloem_t2 AT1G79430APL 1002 121
In [92]:
dat <- de %>% group_by(gene) %>% reframe(myAUC_rank = mean(myAUC_rank),avg_diff_rank = mean(avg_diff_rank))
dat <- dat %>% arrange(myAUC_rank)
colnames(dat) <- c("GeneID","myAUC_rank","avg_diff_rank")
In [93]:
de_GeneSys <- dat
In [94]:
run_r50_de <- function(x, dat){
    de <- dat
    de$combined_score <- de[,grep(x,colnames(de))]
    de <- de %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(de))){
        if (de$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}

Plot r50 with ranked by different centrality¶

In [95]:
## Expressed TFs permutation
R50_permutation <- c()
for (j in 1:1000){
ran <- sample(exptf, length(exptf), replace=FALSE)
count <- 0
for (i in seq(length(ran))){
    if (ran[i] %in% gsgo){
        count <- count +1
        if (count == r50){
            R50_permutation <- c(R50_permutation,i)
            break
        }
    }
}
}
In [96]:
toplt <- data.frame(Methods=c("LIMA degree centrality (GeneSys)", "LIMA out centrality (GeneSys)", "LIMA in centrality (GeneSys)", "LIMA betweenness centrality (GeneSys)", 
                 "LIMA eigenvector centrality (GeneSys)","LIMA degree centrality (scRNAseq)", "LIMA out centrality (scRNAseq)", "LIMA in centrality (scRNAseq)", "LIMA betweenness centrality (scRNAseq)", 
                "LIMA eigenvector centrality (scRNAseq)", "CellOracle degree centrality (scRNAseq)", "CellOracle out centrality (scRNAseq)", 
                 "CellOracle in centrality (scRNAseq)", "CellOracle betweenness centrality (scRNAseq)", "CellOracle eigenvector centrality (scRNAseq)",
                 "CellOracle degree centrality (GeneSys)", "CellOracle out centrality (GeneSys)", 
                 "CellOracle in centrality (GeneSys)", "CellOracle betweenness centrality (GeneSys)", "CellOracle eigenvector centrality (GeneSys)",
                 "DE myAUC rank (scRNAseq)", "DE avg diff rank (scRNAseq)", "DE myAUC rank (GeneSys)", "DE avg diff rank (GeneSys)", "Permutation"),
           R50=c(run_r50_genesys('degree_centrality'),run_r50_genesys('out_centrality'),run_r50_genesys('in_centrality'),
                 run_r50_genesys('betweenness_centrality'),run_r50_genesys('eigenvector_centrality'),
                 run_r50_scRNAseq('degree_centrality'),run_r50_scRNAseq('out_centrality'),run_r50_scRNAseq('in_centrality'),
                 run_r50_scRNAseq('betweenness_centrality'),run_r50_scRNAseq('eigenvector_centrality'),
                 run_r50_celloracle('degree_centrality', celloracle_scRNAseq),run_r50_celloracle('out_centrality', celloracle_scRNAseq),run_r50_celloracle('in_centrality', celloracle_scRNAseq),
                 run_r50_celloracle('betweenness_centrality', celloracle_scRNAseq),run_r50_celloracle('eigenvector_centrality', celloracle_scRNAseq),
                 run_r50_celloracle('degree_centrality', celloracle_GeneSys),run_r50_celloracle('out_centrality', celloracle_GeneSys),run_r50_celloracle('in_centrality', celloracle_GeneSys),
                 run_r50_celloracle('betweenness_centrality', celloracle_GeneSys),run_r50_celloracle('eigenvector_centrality', celloracle_GeneSys),
                 run_r50_de('myAUC_rank', de_scRNAseq),run_r50_de('avg_diff_rank', de_scRNAseq),run_r50_de('myAUC_rank', de_GeneSys),run_r50_de('avg_diff_rank', de_GeneSys), mean(R50_permutation)))
In [97]:
toplt
A data.frame: 25 x 2
MethodsR50
<chr><dbl>
LIMA degree centrality (GeneSys) 314.000
LIMA out centrality (GeneSys) 327.000
LIMA in centrality (GeneSys) 375.000
LIMA betweenness centrality (GeneSys) 335.000
LIMA eigenvector centrality (GeneSys) 432.000
LIMA degree centrality (scRNAseq) 365.000
LIMA out centrality (scRNAseq) 330.000
LIMA in centrality (scRNAseq) 444.000
LIMA betweenness centrality (scRNAseq) 447.000
LIMA eigenvector centrality (scRNAseq) 536.000
CellOracle degree centrality (scRNAseq) 470.000
CellOracle out centrality (scRNAseq) 513.000
CellOracle in centrality (scRNAseq) 517.000
CellOracle betweenness centrality (scRNAseq)410.000
CellOracle eigenvector centrality (scRNAseq)453.000
CellOracle degree centrality (GeneSys) 434.000
CellOracle out centrality (GeneSys) 466.000
CellOracle in centrality (GeneSys) 312.000
CellOracle betweenness centrality (GeneSys) 335.000
CellOracle eigenvector centrality (GeneSys) 445.000
DE myAUC rank (scRNAseq) 380.000
DE avg diff rank (scRNAseq) 403.000
DE myAUC rank (GeneSys) 310.000
DE avg diff rank (GeneSys) 331.000
Permutation 743.406
In [98]:
options(repr.plot.width=10, repr.plot.height=8)
ggplot(toplt, aes(x=reorder(Methods, R50, decreasing = TRUE),  y=R50)) + geom_point(size=4)+ 
  labs(title="TF Prioritization Performance",x="", y = "R50")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [99]:
toplt <- data.frame(Methods=factor(c(rep("LIMA (GeneSys)",5), rep("LIMA (scRNAseq)",5), rep("CellOracle (scRNAseq)",5), rep("CellOracle (GeneSys)",5), rep("DE (scRNAseq)",2), rep("DE (GeneSys)",2), "Permutation"), 
                                   levels=c("Permutation", "CellOracle (scRNAseq)", "LIMA (scRNAseq)", "CellOracle (GeneSys)", "DE (scRNAseq)", "LIMA (GeneSys)", "DE (GeneSys)")), R50=toplt$R50)

options(repr.plot.width=6, repr.plot.height=5)
ggplot(toplt, aes(x=Methods, y=R50))+
  geom_boxplot(width=0.4)+ 
  labs(title="TF Prioritization Performance",x="", y = "R50")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [100]:
toplt <- data.frame(Methods=factor(c(rep("LIMA (GeneSys)",5), rep("LIMA (scRNAseq)",5), rep("CellOracle (scRNAseq)",5), rep("CellOracle (GeneSys)",5), rep("DE (scRNAseq)",2), rep("DE (GeneSys)",2), "Permutation"), 
                                   levels=c("Permutation", "CellOracle (scRNAseq)", "CellOracle (GeneSys)", "LIMA (scRNAseq)", "LIMA (GeneSys)", "DE (scRNAseq)", "DE (GeneSys)")), R50=toplt$R50)

options(repr.plot.width=6, repr.plot.height=5)
ggplot(toplt, aes(x=Methods, y=R50))+
  geom_boxplot(width=0.4)+ 
  labs(title="TF Prioritization Performance",x="", y = "R50")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [101]:
toplt <- data.frame(Methods=factor(c(rep("LIMA (GeneSys)",5), rep("LIMA (scRNAseq)",5), rep("CellOracle (scRNAseq)",5), rep("CellOracle (GeneSys)",5), rep("DE (scRNAseq)",2), rep("DE (GeneSys)",2), "Permutation"), 
                                   levels=c("Permutation", "CellOracle (scRNAseq)", "LIMA (scRNAseq)", "DE (scRNAseq)", "CellOracle (GeneSys)", "LIMA (GeneSys)", "DE (GeneSys)")), R50=toplt$R50)

options(repr.plot.width=6, repr.plot.height=5)
ggplot(toplt, aes(x=Methods, y=R50))+
  geom_boxplot(width=0.4)+ 
  labs(title="TF Prioritization Performance",x="", y = "R50")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image

R50 for Tissue specific TFs¶

Stele (xylem, phloem, procambium)¶

In [102]:
gsgo_miniex_stringdb <- gsgo
In [103]:
gsgo <- read.csv("./Gold_Standard_Root_TF_StringDB.csv", header=TRUE)
gsgo <- gsgo[which(gsgo[,5]=="Yes"),]
gsgo$preferredName
gsgo <- gsgo$GeneID
gsgo <- intersect(gsgo, gsgo_miniex_stringdb)
  1. 'APL'
  2. 'ATHB-8'
  3. 'BHLH48'
  4. 'DAR2'
  5. 'DOF5.3'
  6. 'DOF5.6'
  7. 'DOT2'
  8. 'ERF104'
  9. 'ET2'
  10. 'GATA12'
  11. 'KAN1'
  12. 'KNAT7'
  13. 'LBD15'
  14. 'LBD18'
  15. 'LBD30'
  16. 'LBD4'
  17. 'LHW'
  18. 'MYB20'
  19. 'MYB32'
  20. 'MYB43'
  21. 'MYB46'
  22. 'MYB52'
  23. 'MYB61'
  24. 'MYB7'
  25. 'MYB83'
  26. 'MYB85'
  27. 'NAC005'
  28. 'NAC007'
  29. 'NAC010'
  30. 'NAC026'
  31. 'NAC030'
  32. 'NAC037'
  33. 'NAC043'
  34. 'NAC045'
  35. 'NAC075'
  36. 'NAC076'
  37. 'NAC083'
  38. 'NAC086'
  39. 'NAC101'
  40. 'NAC104'
  41. 'NAC105'
  42. 'REV'
  43. 'WOX14'
In [104]:
length(gsgo)
32
In [105]:
r50 <- 16
In [106]:
## Define genesys
run_r50_genesys <- function(x){
    genesys$ct_score <- min_max_normalize(rowSums(apply(genesys[,grep(paste0('xyl_',x,'|phl_',x,'|pro_',x),colnames(genesys))],2,as.numeric)))
    genesys$combined_score <- genesys$ct_score
    
    genesys <- genesys %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(genesys))){
        if (genesys$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [107]:
## Define raw
run_r50_scRNAseq <- function(x){
    raw$ct_score <- min_max_normalize(rowSums(apply(raw[,grep(paste0('xyl_',x,'|phl_',x,'|pro_',x),colnames(raw))],2,as.numeric)))
    raw$combined_score <- raw$ct_score
    
    raw <- raw %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(raw))){
        if (raw$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [108]:
## Define celloracle
pro <- prepros("../celloracle/procambium_X_root_integrated_celloracle_gene_score_iGRN.csv")
xyl <- prepros("../celloracle/xylem_X_root_integrated_celloracle_gene_score_iGRN.csv")
phl <- prepros("../celloracle/phloem_X_root_integrated_celloracle_gene_score_iGRN.csv")
## Define celloracle
dat <- rbind(pro, xyl, phl)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all), 
                                  in_centrality = min_max_normalize(degree_centrality_in), 
                                  out_centrality = min_max_normalize(degree_centrality_out),
                                 betweenness_centrality = min_max_normalize(betweenness_centrality),
                                 eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality), 
                                  in_centrality = sum(in_centrality), 
                                  out_centrality = sum(out_centrality),
                                 betweenness_centrality = sum(betweenness_centrality),
                                 eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:6],2,min_max_normalize))

celloracle_scRNAseq <- dat

## Define celloracle
pro <- prepros("../celloracle/procambium_P_root_integrated_celloracle_gene_score_iGRN.csv")
xyl <- prepros("../celloracle/xylem_P_root_integrated_celloracle_gene_score_iGRN.csv")
phl <- prepros("../celloracle/phloem_P_root_integrated_celloracle_gene_score_iGRN.csv")
## Define celloracle
dat <- rbind(pro, xyl, phl)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all), 
                                  in_centrality = min_max_normalize(degree_centrality_in), 
                                  out_centrality = min_max_normalize(degree_centrality_out),
                                 betweenness_centrality = min_max_normalize(betweenness_centrality),
                                 eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality), 
                                  in_centrality = sum(in_centrality), 
                                  out_centrality = sum(out_centrality),
                                 betweenness_centrality = sum(betweenness_centrality),
                                 eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:6],2,min_max_normalize))

celloracle_GeneSys <- dat

run_r50_celloracle <- function(x, dat){
    celloracle <- dat
    celloracle$combined_score <- celloracle[,grep(x,colnames(celloracle))]
    celloracle <- celloracle %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(celloracle))){
        if (celloracle$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [109]:
de <- read.csv("Input_X_root_markers_ROC.csv")
In [110]:
## Define DE
de <- read.csv("Input_X_root_markers_ROC.csv")
de <- de[c(grep("Xylem",de$cluster),grep("Phloem",de$cluster),grep("Procambium",de$cluster)),]
de <- de[!is.na(match(de$gene,exptf)),]
dat <- de %>% group_by(gene) %>% reframe(myAUC_rank = mean(myAUC_rank),avg_diff_rank = mean(avg_diff_rank))
colnames(dat) <- c("GeneID","myAUC_rank","avg_diff_rank")
de_scRNAseq <- dat
In [111]:
de <- read.csv("GeneSys_P_root_markers_ROC.csv")
de <- de[c(grep("Xylem",de$cluster),grep("Phloem",de$cluster),grep("Procambium",de$cluster)),]
de <- de[!is.na(match(de$gene,exptf)),]
dat <- de %>% group_by(gene) %>% reframe(myAUC_rank = mean(myAUC_rank),avg_diff_rank = mean(avg_diff_rank))
colnames(dat) <- c("GeneID","myAUC_rank","avg_diff_rank")
de_GeneSys <- dat
In [112]:
run_r50_de <- function(x, dat){
    de <- dat
    de$combined_score <- de[,grep(x,colnames(de))]
    de <- de %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(de))){
        if (de$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [113]:
## Expressed TFs permutation
R50_permutation <- c()
for (j in 1:1000){
ran <- sample(exptf, length(exptf), replace=FALSE)
count <- 0
for (i in seq(length(ran))){
    if (ran[i] %in% gsgo){
        count <- count +1
        if (count == r50){
            R50_permutation <- c(R50_permutation,i)
            break
        }
    }
}
}
In [114]:
toplt <- data.frame(Methods=c("LIMA degree centrality (GeneSys)", "LIMA out centrality (GeneSys)", "LIMA in centrality (GeneSys)", "LIMA betweenness centrality (GeneSys)", 
                 "LIMA eigenvector centrality (GeneSys)","LIMA degree centrality (scRNAseq)", "LIMA out centrality (scRNAseq)", "LIMA in centrality (scRNAseq)", "LIMA betweenness centrality (scRNAseq)", 
                "LIMA eigenvector centrality (scRNAseq)", "CellOracle degree centrality (scRNAseq)", "CellOracle out centrality (scRNAseq)", 
                 "CellOracle in centrality (scRNAseq)", "CellOracle betweenness centrality (scRNAseq)", "CellOracle eigenvector centrality (scRNAseq)",
                 "CellOracle degree centrality (GeneSys)", "CellOracle out centrality (GeneSys)", 
                 "CellOracle in centrality (GeneSys)", "CellOracle betweenness centrality (GeneSys)", "CellOracle eigenvector centrality (GeneSys)",
                 "DE myAUC rank (scRNAseq)", "DE avg diff rank (scRNAseq)", "DE myAUC rank (GeneSys)", "DE avg diff rank (GeneSys)", "Permutation"),
           R50=c(run_r50_genesys('degree_centrality'),run_r50_genesys('out_centrality'),run_r50_genesys('in_centrality'),
                 run_r50_genesys('betweenness_centrality'),run_r50_genesys('eigenvector_centrality'),
                 run_r50_scRNAseq('degree_centrality'),run_r50_scRNAseq('out_centrality'),run_r50_scRNAseq('in_centrality'),
                 run_r50_scRNAseq('betweenness_centrality'),run_r50_scRNAseq('eigenvector_centrality'),
                 run_r50_celloracle('degree_centrality', celloracle_scRNAseq),run_r50_celloracle('out_centrality', celloracle_scRNAseq),run_r50_celloracle('in_centrality', celloracle_scRNAseq),
                 run_r50_celloracle('betweenness_centrality', celloracle_scRNAseq),run_r50_celloracle('eigenvector_centrality', celloracle_scRNAseq),
                 run_r50_celloracle('degree_centrality', celloracle_GeneSys),run_r50_celloracle('out_centrality', celloracle_GeneSys),run_r50_celloracle('in_centrality', celloracle_GeneSys),
                 run_r50_celloracle('betweenness_centrality', celloracle_GeneSys),run_r50_celloracle('eigenvector_centrality', celloracle_GeneSys),
                 run_r50_de('myAUC_rank', de_scRNAseq),run_r50_de('avg_diff_rank', de_scRNAseq),run_r50_de('myAUC_rank', de_GeneSys),run_r50_de('avg_diff_rank', de_GeneSys), mean(R50_permutation)))
In [115]:
toplt
A data.frame: 25 x 2
MethodsR50
<chr><dbl>
LIMA degree centrality (GeneSys) 125.000
LIMA out centrality (GeneSys) 86.000
LIMA in centrality (GeneSys) 205.000
LIMA betweenness centrality (GeneSys) 119.000
LIMA eigenvector centrality (GeneSys) 165.000
LIMA degree centrality (scRNAseq) 122.000
LIMA out centrality (scRNAseq) 86.000
LIMA in centrality (scRNAseq) 164.000
LIMA betweenness centrality (scRNAseq) 200.000
LIMA eigenvector centrality (scRNAseq) 212.000
CellOracle degree centrality (scRNAseq) 261.000
CellOracle out centrality (scRNAseq) 318.000
CellOracle in centrality (scRNAseq) 148.000
CellOracle betweenness centrality (scRNAseq)111.000
CellOracle eigenvector centrality (scRNAseq)217.000
CellOracle degree centrality (GeneSys) 203.000
CellOracle out centrality (GeneSys) 250.000
CellOracle in centrality (GeneSys) 94.000
CellOracle betweenness centrality (GeneSys) 95.000
CellOracle eigenvector centrality (GeneSys) 183.000
DE myAUC rank (scRNAseq) 163.000
DE avg diff rank (scRNAseq) 179.000
DE myAUC rank (GeneSys) 132.000
DE avg diff rank (GeneSys) 142.000
Permutation 727.653
In [116]:
options(repr.plot.width=10, repr.plot.height=8)
ggplot(toplt, aes(x=reorder(Methods, R50, decreasing = TRUE),  y=R50)) + geom_point(size=4)+ 
  labs(title="Stele-specific TF Prioritization Performance",x="", y = "R50")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [117]:
toplt <- data.frame(Methods=factor(c(rep("LIMA (GeneSys)",5), rep("LIMA (scRNAseq)",5), rep("CellOracle (scRNAseq)",5), rep("CellOracle (GeneSys)",5), rep("DE (scRNAseq)",2), rep("DE (GeneSys)",2), "Permutation"), 
                                   levels=c("Permutation", "CellOracle (scRNAseq)", "DE (scRNAseq)", "LIMA (scRNAseq)", "CellOracle (GeneSys)", "DE (GeneSys)", "LIMA (GeneSys)")), R50=toplt$R50)

options(repr.plot.width=6, repr.plot.height=5)
ggplot(toplt, aes(x=Methods, y=R50))+
  geom_boxplot(width=0.4)+ 
  labs(title="Stele-specific TF Prioritization Performance",x="", y = "R50")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image

Epidermis¶

In [118]:
gsgo <- read.csv("./Gold_Standard_Root_TF_StringDB.csv", header=TRUE)
gsgo <- gsgo[which(gsgo[,6]=="Yes"),]
gsgo$preferredName
gsgo <- gsgo$GeneID
gsgo <- intersect(gsgo, gsgo_miniex_stringdb)
  1. 'AGL16'
  2. 'AL6'
  3. 'ANL2'
  4. 'BHLH12'
  5. 'BHLH2'
  6. 'BHLH32'
  7. 'BHLH54'
  8. 'BHLH66'
  9. 'BHLH69'
  10. 'BHLH82'
  11. 'BHLH83'
  12. 'BHLH85'
  13. 'BHLH86'
  14. 'CPC'
  15. 'E2FB'
  16. 'ETC1'
  17. 'GALT2'
  18. 'GIS3'
  19. 'GL2'
  20. 'GL3'
  21. 'GTL1'
  22. 'HDG11'
  23. 'HDG12'
  24. 'HDG2'
  25. 'JMJ25'
  26. 'MAMYB'
  27. 'MYB124'
  28. 'MYB23'
  29. 'MYB86'
  30. 'MYB88'
  31. 'MYC3'
  32. 'MYC4'
  33. 'RBR1'
  34. 'SCL22'
  35. 'SCL27'
  36. 'SCL6'
  37. 'SCRM'
  38. 'TCX2'
  39. 'TCX3'
  40. 'TRY'
  41. 'TSO1'
  42. 'TTG1'
  43. 'WER'
  44. 'WRKY44'
  45. 'WRKY75'
  46. 'ZFP5'
  47. 'ZFP6'
  48. 'ZFP8'
In [119]:
## R35
length(gsgo)
r50 <- 13
37
In [120]:
## Define genesys
run_r50_genesys <- function(x){
    genesys$ct_score <- min_max_normalize(rowSums(apply(genesys[,grep(paste0('atri_',x,'|tri_',x,'|lrc_',x),colnames(genesys))],2,as.numeric)))
    genesys$combined_score <- genesys$ct_score
    
    genesys <- genesys %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(genesys))){
        if (genesys$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [121]:
## Define raw
run_r50_scRNAseq <- function(x){
    raw$ct_score <- min_max_normalize(rowSums(apply(raw[,grep(paste0('atri_',x,'|tri_',x,'|lrc_',x),colnames(raw))],2,as.numeric)))
    raw$combined_score <- raw$ct_score
    
    raw <- raw %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(raw))){
        if (raw$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [122]:
## Define celloracle
atri <- prepros("../celloracle/atrichoblast_X_root_integrated_celloracle_gene_score_iGRN.csv")
tri <- prepros("../celloracle/trichoblast_X_root_integrated_celloracle_gene_score_iGRN.csv")
lrc <- prepros("../celloracle/lrc_X_root_integrated_celloracle_gene_score_iGRN.csv")
## Define celloracle
dat <- rbind(atri, tri, lrc)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all), 
                                  in_centrality = min_max_normalize(degree_centrality_in), 
                                  out_centrality = min_max_normalize(degree_centrality_out),
                                 betweenness_centrality = min_max_normalize(betweenness_centrality),
                                 eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality), 
                                  in_centrality = sum(in_centrality), 
                                  out_centrality = sum(out_centrality),
                                 betweenness_centrality = sum(betweenness_centrality),
                                 eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:6],2,min_max_normalize))

celloracle_scRNAseq <- dat

## Define celloracle
atri <- prepros("../celloracle/atrichoblast_P_root_integrated_celloracle_gene_score_iGRN.csv")
tri <- prepros("../celloracle/trichoblast_P_root_integrated_celloracle_gene_score_iGRN.csv")
lrc <- prepros("../celloracle/lrc_P_root_integrated_celloracle_gene_score_iGRN.csv")
## Define celloracle
dat <- rbind(atri, tri, lrc)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all), 
                                  in_centrality = min_max_normalize(degree_centrality_in), 
                                  out_centrality = min_max_normalize(degree_centrality_out),
                                 betweenness_centrality = min_max_normalize(betweenness_centrality),
                                 eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality), 
                                  in_centrality = sum(in_centrality), 
                                  out_centrality = sum(out_centrality),
                                 betweenness_centrality = sum(betweenness_centrality),
                                 eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:6],2,min_max_normalize))

celloracle_GeneSys <- dat

run_r50_celloracle <- function(x, dat){
    celloracle <- dat
    celloracle$combined_score <- celloracle[,grep(x,colnames(celloracle))]
    celloracle <- celloracle %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(celloracle))){
        if (celloracle$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [123]:
## Define DE
de <- read.csv("Input_X_root_markers_ROC.csv")
de <- de[c(grep("Atrichoblast",de$cluster),grep("Trichoblast",de$cluster),grep("Lateral Root Cap",de$cluster)),]
de <- de[!is.na(match(de$gene,exptf)),]
dat <- de %>% group_by(gene) %>% reframe(myAUC_rank = mean(myAUC_rank),avg_diff_rank = mean(avg_diff_rank))
colnames(dat) <- c("GeneID","myAUC_rank","avg_diff_rank")
de_scRNAseq <- dat

de <- read.csv("GeneSys_P_root_markers_ROC.csv")
de <- de[c(grep("Atrichoblast",de$cluster),grep("Trichoblast",de$cluster),grep("Lateral Root Cap",de$cluster)),]
de <- de[!is.na(match(de$gene,exptf)),]
dat <- de %>% group_by(gene) %>% reframe(myAUC_rank = mean(myAUC_rank),avg_diff_rank = mean(avg_diff_rank))
colnames(dat) <- c("GeneID","myAUC_rank","avg_diff_rank")
de_GeneSys <- dat

run_r50_de <- function(x, dat){
    de <- dat
    de$combined_score <- de[,grep(x,colnames(de))]
    de <- de %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(de))){
        if (de$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [124]:
## Expressed TFs permutation
R50_permutation <- c()
for (j in 1:1000){
ran <- sample(exptf, length(exptf), replace=FALSE)
count <- 0
for (i in seq(length(ran))){
    if (ran[i] %in% gsgo){
        count <- count +1
        if (count == r50){
            R50_permutation <- c(R50_permutation,i)
            break
        }
    }
}
}
In [125]:
length(intersect(de_GeneSys$GeneID, gsgo))
13
In [126]:
toplt <- data.frame(Methods=c("LIMA degree centrality (GeneSys)", "LIMA out centrality (GeneSys)", "LIMA in centrality (GeneSys)", "LIMA betweenness centrality (GeneSys)", 
                 "LIMA eigenvector centrality (GeneSys)","LIMA degree centrality (scRNAseq)", "LIMA out centrality (scRNAseq)", "LIMA in centrality (scRNAseq)", "LIMA betweenness centrality (scRNAseq)", 
                "LIMA eigenvector centrality (scRNAseq)", "CellOracle degree centrality (scRNAseq)", "CellOracle out centrality (scRNAseq)", 
                 "CellOracle in centrality (scRNAseq)", "CellOracle betweenness centrality (scRNAseq)", "CellOracle eigenvector centrality (scRNAseq)",
                 "CellOracle degree centrality (GeneSys)", "CellOracle out centrality (GeneSys)", 
                 "CellOracle in centrality (GeneSys)", "CellOracle betweenness centrality (GeneSys)", "CellOracle eigenvector centrality (GeneSys)",
                 "DE myAUC rank (scRNAseq)", "DE avg diff rank (scRNAseq)", "DE myAUC rank (GeneSys)", "DE avg diff rank (GeneSys)", "Permutation"),
           R50=c(run_r50_genesys('degree_centrality'),run_r50_genesys('out_centrality'),run_r50_genesys('in_centrality'),
                 run_r50_genesys('betweenness_centrality'),run_r50_genesys('eigenvector_centrality'),
                 run_r50_scRNAseq('degree_centrality'),run_r50_scRNAseq('out_centrality'),run_r50_scRNAseq('in_centrality'),
                 run_r50_scRNAseq('betweenness_centrality'),run_r50_scRNAseq('eigenvector_centrality'),
                 run_r50_celloracle('degree_centrality', celloracle_scRNAseq),run_r50_celloracle('out_centrality', celloracle_scRNAseq),run_r50_celloracle('in_centrality', celloracle_scRNAseq),
                 run_r50_celloracle('betweenness_centrality', celloracle_scRNAseq),run_r50_celloracle('eigenvector_centrality', celloracle_scRNAseq),
                 run_r50_celloracle('degree_centrality', celloracle_GeneSys),run_r50_celloracle('out_centrality', celloracle_GeneSys),run_r50_celloracle('in_centrality', celloracle_GeneSys),
                 run_r50_celloracle('betweenness_centrality', celloracle_GeneSys),run_r50_celloracle('eigenvector_centrality', celloracle_GeneSys),
                 run_r50_de('myAUC_rank', de_scRNAseq),run_r50_de('avg_diff_rank', de_scRNAseq),run_r50_de('myAUC_rank', de_GeneSys),run_r50_de('avg_diff_rank', de_GeneSys), mean(R50_permutation)))
In [127]:
toplt
A data.frame: 25 x 2
MethodsR50
<chr><dbl>
LIMA degree centrality (GeneSys) 105.000
LIMA out centrality (GeneSys) 148.000
LIMA in centrality (GeneSys) 108.000
LIMA betweenness centrality (GeneSys) 81.000
LIMA eigenvector centrality (GeneSys) 142.000
LIMA degree centrality (scRNAseq) 112.000
LIMA out centrality (scRNAseq) 120.000
LIMA in centrality (scRNAseq) 142.000
LIMA betweenness centrality (scRNAseq) 100.000
LIMA eigenvector centrality (scRNAseq) 170.000
CellOracle degree centrality (scRNAseq) 270.000
CellOracle out centrality (scRNAseq) 352.000
CellOracle in centrality (scRNAseq) 131.000
CellOracle betweenness centrality (scRNAseq)163.000
CellOracle eigenvector centrality (scRNAseq)301.000
CellOracle degree centrality (GeneSys) 296.000
CellOracle out centrality (GeneSys) 406.000
CellOracle in centrality (GeneSys) 141.000
CellOracle betweenness centrality (GeneSys) 222.000
CellOracle eigenvector centrality (GeneSys) 309.000
DE myAUC rank (scRNAseq) 91.000
DE avg diff rank (scRNAseq) 113.000
DE myAUC rank (GeneSys) 81.000
DE avg diff rank (GeneSys) 92.000
Permutation 510.154
In [128]:
options(repr.plot.width=10, repr.plot.height=8)
ggplot(toplt, aes(x=reorder(Methods, R50, decreasing = TRUE),  y=R50)) + geom_point(size=4)+ 
  labs(title="Epidermis-specific TF Prioritization Performance",x="", y = "R35")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [129]:
toplt <- data.frame(Methods=factor(c(rep("LIMA (GeneSys)",5), rep("LIMA (scRNAseq)",5), rep("CellOracle (scRNAseq)",5), rep("CellOracle (GeneSys)",5), rep("DE (scRNAseq)",2), rep("DE (GeneSys)",2), "Permutation"), 
                                   levels=c("Permutation", "CellOracle (scRNAseq)", "LIMA (scRNAseq)", "DE (scRNAseq)", "CellOracle (GeneSys)", "LIMA (GeneSys)", "DE (GeneSys)")), R50=toplt$R50)

options(repr.plot.width=6, repr.plot.height=5)
ggplot(toplt, aes(x=Methods, y=R50))+
  geom_boxplot(width=0.4)+ 
  labs(title="Epidermis-specific TF Prioritization Performance",x="", y = "R35")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image

R50 for celltype specific¶

Xylem¶

In [130]:
gsgo <- read.csv("./Gold_Standard_Root_TF_StringDB.csv", header=TRUE)
gsgo <- gsgo[which(gsgo[,7]=="Yes"),]
gsgo$preferredName
gsgo <- gsgo$GeneID
gsgo <- intersect(gsgo, gsgo_miniex_stringdb)
  1. 'APL'
  2. 'ATHB-8'
  3. 'BHLH48'
  4. 'ET2'
  5. 'KNAT7'
  6. 'LBD18'
  7. 'LBD30'
  8. 'LHW'
  9. 'MYB20'
  10. 'MYB32'
  11. 'MYB43'
  12. 'MYB46'
  13. 'MYB52'
  14. 'MYB61'
  15. 'MYB7'
  16. 'MYB83'
  17. 'MYB85'
  18. 'NAC005'
  19. 'NAC007'
  20. 'NAC010'
  21. 'NAC026'
  22. 'NAC030'
  23. 'NAC037'
  24. 'NAC043'
  25. 'NAC076'
  26. 'NAC083'
  27. 'NAC101'
  28. 'NAC104'
  29. 'NAC105'
  30. 'REV'
In [131]:
length(gsgo)
r50 <- 10
19
In [132]:
## Define genesys
run_r50_genesys <- function(x){
    genesys$ct_score <- min_max_normalize(rowSums(apply(genesys[,grep(paste0('xyl_',x),colnames(genesys))],2,as.numeric)))
    genesys$combined_score <- genesys$ct_score
    
    genesys <- genesys %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(genesys))){
        if (genesys$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [133]:
## Define genesys
run_r50_scRNAseq <- function(x){
    raw$ct_score <- min_max_normalize(rowSums(apply(raw[,grep(paste0('xyl_',x),colnames(raw))],2,as.numeric)))
    raw$combined_score <- raw$ct_score
    
    raw <- raw %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(raw))){
        if (raw$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [134]:
## Define celloracle
xyl <- prepros("../celloracle/xylem_X_root_integrated_celloracle_gene_score_iGRN.csv")
## Define celloracle
dat <- rbind(xyl)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all), 
                                  in_centrality = min_max_normalize(degree_centrality_in), 
                                  out_centrality = min_max_normalize(degree_centrality_out),
                                 betweenness_centrality = min_max_normalize(betweenness_centrality),
                                 eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality), 
                                  in_centrality = sum(in_centrality), 
                                  out_centrality = sum(out_centrality),
                                 betweenness_centrality = sum(betweenness_centrality),
                                 eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:6],2,min_max_normalize))

celloracle_scRNAseq <- dat

## Define celloracle
xyl <- prepros("../celloracle/xylem_P_root_integrated_celloracle_gene_score_iGRN.csv")
## Define celloracle
dat <- rbind(xyl)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all), 
                                  in_centrality = min_max_normalize(degree_centrality_in), 
                                  out_centrality = min_max_normalize(degree_centrality_out),
                                 betweenness_centrality = min_max_normalize(betweenness_centrality),
                                 eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality), 
                                  in_centrality = sum(in_centrality), 
                                  out_centrality = sum(out_centrality),
                                 betweenness_centrality = sum(betweenness_centrality),
                                 eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:6],2,min_max_normalize))

celloracle_GeneSys <- dat

run_r50_celloracle <- function(x, dat){
    celloracle <- dat
    celloracle$combined_score <- celloracle[,grep(x,colnames(celloracle))]
    celloracle <- celloracle %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(celloracle))){
        if (celloracle$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [135]:
## Define DE
de <- read.csv("Input_X_root_markers_ROC.csv")
de <- de[c(grep("Xylem",de$cluster)),]
de <- de[!is.na(match(de$gene,exptf)),]
dat <- de %>% group_by(gene) %>% reframe(myAUC_rank = mean(myAUC_rank),avg_diff_rank = mean(avg_diff_rank))
colnames(dat) <- c("GeneID","myAUC_rank","avg_diff_rank")
de_scRNAseq <- dat

de <- read.csv("GeneSys_P_root_markers_ROC.csv")
de <- de[c(grep("Xylem",de$cluster)),]
de <- de[!is.na(match(de$gene,exptf)),]
dat <- de %>% group_by(gene) %>% reframe(myAUC_rank = mean(myAUC_rank),avg_diff_rank = mean(avg_diff_rank))
colnames(dat) <- c("GeneID","myAUC_rank","avg_diff_rank")
de_GeneSys <- dat

run_r50_de <- function(x, dat){
    de <- dat
    de$combined_score <- de[,grep(x,colnames(de))]
    de <- de %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(de))){
        if (de$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [136]:
## Expressed TFs permutation
R50_permutation <- c()
for (j in 1:1000){
ran <- sample(exptf, length(exptf), replace=FALSE)
count <- 0
for (i in seq(length(ran))){
    if (ran[i] %in% gsgo){
        count <- count +1
        if (count == r50){
            R50_permutation <- c(R50_permutation,i)
            break
        }
    }
}
}
In [137]:
toplt <- data.frame(Methods=c("LIMA degree centrality (GeneSys)", "LIMA out centrality (GeneSys)", "LIMA in centrality (GeneSys)", "LIMA betweenness centrality (GeneSys)", 
                 "LIMA eigenvector centrality (GeneSys)","LIMA degree centrality (scRNAseq)", "LIMA out centrality (scRNAseq)", "LIMA in centrality (scRNAseq)", "LIMA betweenness centrality (scRNAseq)", 
                "LIMA eigenvector centrality (scRNAseq)", "CellOracle degree centrality (scRNAseq)", "CellOracle out centrality (scRNAseq)", 
                 "CellOracle in centrality (scRNAseq)", "CellOracle betweenness centrality (scRNAseq)", "CellOracle eigenvector centrality (scRNAseq)",
                 "CellOracle degree centrality (GeneSys)", "CellOracle out centrality (GeneSys)", 
                 "CellOracle in centrality (GeneSys)", "CellOracle betweenness centrality (GeneSys)", "CellOracle eigenvector centrality (GeneSys)",
                 "DE myAUC rank (scRNAseq)", "DE avg diff rank (scRNAseq)", "DE myAUC rank (GeneSys)", "DE avg diff rank (GeneSys)", "Permutation"),
           R50=c(run_r50_genesys('degree_centrality'),run_r50_genesys('out_centrality'),run_r50_genesys('in_centrality'),
                 run_r50_genesys('betweenness_centrality'),run_r50_genesys('eigenvector_centrality'),
                 run_r50_scRNAseq('degree_centrality'),run_r50_scRNAseq('out_centrality'),run_r50_scRNAseq('in_centrality'),
                 run_r50_scRNAseq('betweenness_centrality'),run_r50_scRNAseq('eigenvector_centrality'),
                 run_r50_celloracle('degree_centrality', celloracle_scRNAseq),run_r50_celloracle('out_centrality', celloracle_scRNAseq),run_r50_celloracle('in_centrality', celloracle_scRNAseq),
                 run_r50_celloracle('betweenness_centrality', celloracle_scRNAseq),run_r50_celloracle('eigenvector_centrality', celloracle_scRNAseq),
                 run_r50_celloracle('degree_centrality', celloracle_GeneSys),run_r50_celloracle('out_centrality', celloracle_GeneSys),run_r50_celloracle('in_centrality', celloracle_GeneSys),
                 run_r50_celloracle('betweenness_centrality', celloracle_GeneSys),run_r50_celloracle('eigenvector_centrality', celloracle_GeneSys),
                 run_r50_de('myAUC_rank', de_scRNAseq),run_r50_de('avg_diff_rank', de_scRNAseq),run_r50_de('myAUC_rank', de_GeneSys),run_r50_de('avg_diff_rank', de_GeneSys), mean(R50_permutation)))
In [138]:
toplt
A data.frame: 25 x 2
MethodsR50
<chr><dbl>
LIMA degree centrality (GeneSys) 21.000
LIMA out centrality (GeneSys) 19.000
LIMA in centrality (GeneSys) 42.000
LIMA betweenness centrality (GeneSys) 52.000
LIMA eigenvector centrality (GeneSys) 23.000
LIMA degree centrality (scRNAseq) 22.000
LIMA out centrality (scRNAseq) 22.000
LIMA in centrality (scRNAseq) 25.000
LIMA betweenness centrality (scRNAseq) 107.000
LIMA eigenvector centrality (scRNAseq) 24.000
CellOracle degree centrality (scRNAseq) 155.000
CellOracle out centrality (scRNAseq) 157.000
CellOracle in centrality (scRNAseq) 40.000
CellOracle betweenness centrality (scRNAseq) 46.000
CellOracle eigenvector centrality (scRNAseq) 72.000
CellOracle degree centrality (GeneSys) 136.000
CellOracle out centrality (GeneSys) 151.000
CellOracle in centrality (GeneSys) 27.000
CellOracle betweenness centrality (GeneSys) 34.000
CellOracle eigenvector centrality (GeneSys) 123.000
DE myAUC rank (scRNAseq) 102.000
DE avg diff rank (scRNAseq) 108.000
DE myAUC rank (GeneSys) 78.000
DE avg diff rank (GeneSys) 90.000
Permutation 742.959
In [139]:
options(repr.plot.width=10, repr.plot.height=8)
ggplot(toplt, aes(x=reorder(Methods, R50, decreasing = TRUE),  y=R50)) + geom_point(size=4)+ 
  labs(title="Xylem-specific TF Prioritization Performance",x="", y = "R50")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [140]:
toplt <- data.frame(Methods=factor(c(rep("LIMA (GeneSys)",5), rep("LIMA (scRNAseq)",5), rep("CellOracle (scRNAseq)",5), rep("CellOracle (GeneSys)",5), rep("DE (scRNAseq)",2), rep("DE (GeneSys)",2), "Permutation"), 
                                   levels=c("Permutation", "CellOracle (scRNAseq)", "DE (scRNAseq)", "LIMA (scRNAseq)", "CellOracle (GeneSys)", "DE (GeneSys)", "LIMA (GeneSys)")), R50=toplt$R50)

options(repr.plot.width=6, repr.plot.height=5)
ggplot(toplt, aes(x=Methods, y=R50))+
  geom_boxplot(width=0.4)+ 
  labs(title="Xylem-specific TF Prioritization Performance",x="", y = "R50")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image

Trichoblast¶

In [141]:
gsgo <- read.csv("./Gold_Standard_Root_TF_StringDB.csv", header=TRUE)
gsgo <- gsgo[which(gsgo[,8]=="Yes"),]
gsgo$preferredName
gsgo <- gsgo$GeneID
gsgo <- intersect(gsgo, gsgo_miniex_stringdb)
  1. 'AL6'
  2. 'ANL2'
  3. 'BHLH12'
  4. 'BHLH2'
  5. 'BHLH32'
  6. 'BHLH54'
  7. 'BHLH66'
  8. 'BHLH69'
  9. 'BHLH82'
  10. 'BHLH83'
  11. 'BHLH85'
  12. 'BHLH86'
  13. 'CPC'
  14. 'E2FB'
  15. 'ETC1'
  16. 'GALT2'
  17. 'GIS3'
  18. 'GL2'
  19. 'GL3'
  20. 'GTL1'
  21. 'HDG11'
  22. 'HDG12'
  23. 'HDG2'
  24. 'MAMYB'
  25. 'MYB23'
  26. 'MYB86'
  27. 'RBR1'
  28. 'SCL22'
  29. 'SCL27'
  30. 'SCL6'
  31. 'TRY'
  32. 'TTG1'
  33. 'WER'
  34. 'ZFP5'
  35. 'ZFP6'
  36. 'ZFP8'
In [142]:
length(gsgo)
r50 <- 5
34
In [143]:
## Define genesys
run_r50_genesys <- function(x){
    genesys$ct_score <- min_max_normalize(rowSums(apply(genesys[,grep(paste0('^tri_',x),colnames(genesys))],2,as.numeric)))
    genesys$combined_score <- genesys$ct_score
    
    genesys <- genesys %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(genesys))){
        if (genesys$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [144]:
## Define raw
run_r50_scRNAseq <- function(x){
    raw$ct_score <- min_max_normalize(rowSums(apply(raw[,grep(paste0('^tri_',x),colnames(raw))],2,as.numeric)))
    raw$combined_score <- raw$ct_score
    
    raw <- raw %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(raw))){
        if (raw$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [145]:
## Define celloracle
tri <- prepros("../celloracle/trichoblast_X_root_integrated_celloracle_gene_score_iGRN.csv")
## Define celloracle
dat <- rbind(tri)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all), 
                                  in_centrality = min_max_normalize(degree_centrality_in), 
                                  out_centrality = min_max_normalize(degree_centrality_out),
                                 betweenness_centrality = min_max_normalize(betweenness_centrality),
                                 eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality), 
                                  in_centrality = sum(in_centrality), 
                                  out_centrality = sum(out_centrality),
                                 betweenness_centrality = sum(betweenness_centrality),
                                 eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:6],2,min_max_normalize))

celloracle_scRNAseq <- dat

## Define celloracle
tri <- prepros("../celloracle/trichoblast_P_root_integrated_celloracle_gene_score_iGRN.csv")
## Define celloracle
dat <- rbind(tri)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all), 
                                  in_centrality = min_max_normalize(degree_centrality_in), 
                                  out_centrality = min_max_normalize(degree_centrality_out),
                                 betweenness_centrality = min_max_normalize(betweenness_centrality),
                                 eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality), 
                                  in_centrality = sum(in_centrality), 
                                  out_centrality = sum(out_centrality),
                                 betweenness_centrality = sum(betweenness_centrality),
                                 eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:6],2,min_max_normalize))

celloracle_GeneSys <- dat

run_r50_celloracle <- function(x, dat){
    celloracle <- dat
    celloracle$combined_score <- celloracle[,grep(x,colnames(celloracle))]
    celloracle <- celloracle %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(celloracle))){
        if (celloracle$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [146]:
## Define DE
de <- read.csv("Input_X_root_markers_ROC.csv")
de <- de[c(grep("Trichoblast",de$cluster)),]
de <- de[!is.na(match(de$gene,exptf)),]
dat <- de %>% group_by(gene) %>% reframe(myAUC_rank = mean(myAUC_rank),avg_diff_rank = mean(avg_diff_rank))
colnames(dat) <- c("GeneID","myAUC_rank","avg_diff_rank")
de_scRNAseq <- dat

de <- read.csv("GeneSys_P_root_markers_ROC.csv")
de <- de[c(grep("Trichoblast",de$cluster)),]
de <- de[!is.na(match(de$gene,exptf)),]
dat <- de %>% group_by(gene) %>% reframe(myAUC_rank = mean(myAUC_rank),avg_diff_rank = mean(avg_diff_rank))
colnames(dat) <- c("GeneID","myAUC_rank","avg_diff_rank")
de_GeneSys <- dat

run_r50_de <- function(x, dat){
    de <- dat
    de$combined_score <- de[,grep(x,colnames(de))]
    de <- de %>% arrange(desc(combined_score))
    count <- 0
    for (i in seq(nrow(de))){
        if (de$GeneID[i] %in% gsgo){
            count <- count +1
            if (count == r50){
                return(i)
                break
            }
        }
    }
}
In [147]:
length(intersect(de_GeneSys$GeneID, gsgo))
6
In [148]:
## Expressed TFs permutation
R50_permutation <- c()
for (j in 1:1000){
ran <- sample(exptf, length(exptf), replace=FALSE)
count <- 0
for (i in seq(length(ran))){
    if (ran[i] %in% gsgo){
        count <- count +1
        if (count == r50){
            R50_permutation <- c(R50_permutation,i)
            break
        }
    }
}
}
In [149]:
toplt <- data.frame(Methods=c("LIMA degree centrality (GeneSys)", "LIMA out centrality (GeneSys)", "LIMA in centrality (GeneSys)", "LIMA betweenness centrality (GeneSys)", 
                 "LIMA eigenvector centrality (GeneSys)","LIMA degree centrality (scRNAseq)", "LIMA out centrality (scRNAseq)", "LIMA in centrality (scRNAseq)", "LIMA betweenness centrality (scRNAseq)", 
                "LIMA eigenvector centrality (scRNAseq)", "CellOracle degree centrality (scRNAseq)", "CellOracle out centrality (scRNAseq)", 
                 "CellOracle in centrality (scRNAseq)", "CellOracle betweenness centrality (scRNAseq)", "CellOracle eigenvector centrality (scRNAseq)",
                 "CellOracle degree centrality (GeneSys)", "CellOracle out centrality (GeneSys)", 
                 "CellOracle in centrality (GeneSys)", "CellOracle betweenness centrality (GeneSys)", "CellOracle eigenvector centrality (GeneSys)",
                 "DE myAUC rank (scRNAseq)", "DE avg diff rank (scRNAseq)", "DE myAUC rank (GeneSys)", "DE avg diff rank (GeneSys)", "Permutation"),
           R50=c(run_r50_genesys('degree_centrality'),run_r50_genesys('out_centrality'),run_r50_genesys('in_centrality'),
                 run_r50_genesys('betweenness_centrality'),run_r50_genesys('eigenvector_centrality'),
                 run_r50_scRNAseq('degree_centrality'),run_r50_scRNAseq('out_centrality'),run_r50_scRNAseq('in_centrality'),
                 run_r50_scRNAseq('betweenness_centrality'),run_r50_scRNAseq('eigenvector_centrality'),
                 run_r50_celloracle('degree_centrality', celloracle_scRNAseq),run_r50_celloracle('out_centrality', celloracle_scRNAseq),run_r50_celloracle('in_centrality', celloracle_scRNAseq),
                 run_r50_celloracle('betweenness_centrality', celloracle_scRNAseq),run_r50_celloracle('eigenvector_centrality', celloracle_scRNAseq),
                 run_r50_celloracle('degree_centrality', celloracle_GeneSys),run_r50_celloracle('out_centrality', celloracle_GeneSys),run_r50_celloracle('in_centrality', celloracle_GeneSys),
                 run_r50_celloracle('betweenness_centrality', celloracle_GeneSys),run_r50_celloracle('eigenvector_centrality', celloracle_GeneSys),
                 run_r50_de('myAUC_rank', de_scRNAseq),run_r50_de('avg_diff_rank', de_scRNAseq),run_r50_de('myAUC_rank', de_GeneSys),run_r50_de('avg_diff_rank', de_GeneSys), mean(R50_permutation)))
In [150]:
toplt
A data.frame: 25 x 2
MethodsR50
<chr><dbl>
LIMA degree centrality (GeneSys) 20.000
LIMA out centrality (GeneSys) 23.000
LIMA in centrality (GeneSys) 31.000
LIMA betweenness centrality (GeneSys) 19.000
LIMA eigenvector centrality (GeneSys) 20.000
LIMA degree centrality (scRNAseq) 20.000
LIMA out centrality (scRNAseq) 22.000
LIMA in centrality (scRNAseq) 26.000
LIMA betweenness centrality (scRNAseq) 16.000
LIMA eigenvector centrality (scRNAseq) 20.000
CellOracle degree centrality (scRNAseq) 17.000
CellOracle out centrality (scRNAseq) 151.000
CellOracle in centrality (scRNAseq) 19.000
CellOracle betweenness centrality (scRNAseq) 45.000
CellOracle eigenvector centrality (scRNAseq) 50.000
CellOracle degree centrality (GeneSys) 63.000
CellOracle out centrality (GeneSys) 133.000
CellOracle in centrality (GeneSys) 23.000
CellOracle betweenness centrality (GeneSys) 32.000
CellOracle eigenvector centrality (GeneSys) 95.000
DE myAUC rank (scRNAseq) 29.000
DE avg diff rank (scRNAseq) 27.000
DE myAUC rank (GeneSys) 25.000
DE avg diff rank (GeneSys) 22.000
Permutation 216.348
In [151]:
options(repr.plot.width=10, repr.plot.height=8)
ggplot(toplt, aes(x=reorder(Methods, R50, decreasing = TRUE),  y=R50)) + geom_point(size=4)+ 
  labs(title="Trichoblast-specific TF Prioritization Performance",x="", y = "R15")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [152]:
toplt <- data.frame(Methods=factor(c(rep("LIMA (GeneSys)",5), rep("LIMA (scRNAseq)",5), rep("CellOracle (scRNAseq)",5), rep("CellOracle (GeneSys)",5), rep("DE (scRNAseq)",2), rep("DE (GeneSys)",2), "Permutation"), 
                                   levels=c("Permutation", "CellOracle (scRNAseq)", "DE (scRNAseq)", "LIMA (scRNAseq)", "CellOracle (GeneSys)", "DE (GeneSys)", "LIMA (GeneSys)")), R50=toplt$R50)

options(repr.plot.width=6, repr.plot.height=5)
ggplot(toplt, aes(x=Methods, y=R50))+
  geom_boxplot(width=0.4)+ 
  labs(title="Trichoblast-specific TF Prioritization Performance",x="", y = "R15")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image

Plotting¶

In [154]:
dat <- genesys
In [155]:
plot_heatmap <- function(gene, centrality){
    sub <- as.numeric(t(dat[which(dat$TF==gene),grep(centrality,colnames(dat))]))
    sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
    ## Cell types
    rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
    ## Transition
    colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
    # Reorder rows
    sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
    col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))

    Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = TRUE, name = paste0(gene,"\n","weighted","\n","network","\n","centrality"),
            col = col_fun, column_title = paste0(str_split_i(centrality,"_",1),"\n",str_split_i(centrality,"_",2)), column_title_gp = gpar(fontsize = 12, fontface = "bold"), 
            cluster_rows = FALSE, cluster_columns = FALSE,
            show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
            text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
       )
}
In [156]:
plot_heatmap2 <- function(gene, centrality){
    sub <- as.numeric(t(dat[which(dat$TF==gene),grep(centrality,colnames(dat))]))
    sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
    ## Cell types
    rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
    ## Transition
    colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
    # Reorder rows
    sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
    col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))

    Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
            col = col_fun, column_title = "out degree \n centrality", column_title_gp = gpar(fontsize = 12, fontface = "bold"), 
            cluster_rows = FALSE, cluster_columns = FALSE,
            show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
            text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
       )
}
In [157]:
plot_heatmap3 <- function(gene, centrality){
    sub <- as.numeric(t(dat[which(dat$TF==gene),grep(centrality,colnames(dat))]))
    sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
    ## Cell types
    rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
    ## Transition
    colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
    # Reorder rows
    sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
    col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))

    Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1), name = paste0("unweighted","\n","network","\n","centrality"),
            col = col_fun, column_title = "in degree \n centrality", column_title_gp = gpar(fontsize = 12, fontface = "bold"), 
            cluster_rows = FALSE, cluster_columns = FALSE,
            show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
            text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
       )
}
In [158]:
plot_all_centrality <- function(gene){
    options(repr.plot.width=10, repr.plot.height=6)
    plot_heatmap(gene,"betweenness_centrality") + plot_heatmap2(gene,"out_centrality") + plot_heatmap3(gene,"in_centrality")
}
In [159]:
plot_all_centrality("TTG1")
No description has been provided for this image
In [149]:
plot_all_centrality("CPC")
No description has been provided for this image
In [150]:
plot_all_centrality("SHR")
No description has been provided for this image
In [151]:
plot_all_centrality("SCR")
No description has been provided for this image
In [152]:
plot_all_centrality("BLJ")
No description has been provided for this image
In [153]:
plot_all_centrality("JKD")
No description has been provided for this image
In [154]:
plot_all_centrality("MYB36")
No description has been provided for this image
In [155]:
plot_all_centrality("RVN")
No description has been provided for this image
In [156]:
plot_all_centrality("MGP")
No description has been provided for this image
In [157]:
plot_all_centrality("NUC")
No description has been provided for this image
In [158]:
plot_all_centrality("WER")
No description has been provided for this image
In [159]:
## HAT7
plot_all_centrality("HAT7")
No description has been provided for this image
In [160]:
## GATA10
plot_all_centrality("GATA10")
No description has been provided for this image
In [161]:
## GATA11
plot_all_centrality("GATA11")
No description has been provided for this image
In [162]:
plot_all_centrality("AN3")
No description has been provided for this image
In [163]:
plot_all_centrality("GL2")
No description has been provided for this image
In [164]:
plot_all_centrality("LBD15")
No description has been provided for this image
In [165]:
plot_all_centrality <- function(gene){
    options(repr.plot.width=8, repr.plot.height=4)
    plot_heatmap(gene,"betweenness_centrality") + plot_heatmap2(gene,"out_centrality") + plot_heatmap3(gene,"in_centrality")
}
In [166]:
plot_all_centrality("SHR")
No description has been provided for this image
In [167]:
plot_all_centrality("WER")
No description has been provided for this image

Rank by betweenness centrality, out-degree centrality, in-degree centrality and degree centrality¶

In [160]:
plot_bc <- function(gene){
    sub <- as.numeric(t(dat[which(dat$TF==gene),grep("betweenness_centrality",colnames(dat))]))
    sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
    ## Cell types
    rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
    ## Transition
    colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
    # Reorder rows
    sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
    col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))

    Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
            col = col_fun, column_title = gene, column_title_gp = gpar(fontsize = 12, fontface = "bold"), 
            cluster_rows = FALSE, cluster_columns = FALSE,
            show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
            text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
       )
}
In [161]:
plot_oc <- function(gene){
    sub <- as.numeric(t(dat[which(dat$TF==gene),grep("out_centrality",colnames(dat))]))
    sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
    ## Cell types
    rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
    ## Transition
    colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
    # Reorder rows
    sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
    col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))

    Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
            col = col_fun, column_title = gene, column_title_gp = gpar(fontsize = 12, fontface = "bold"), 
            cluster_rows = FALSE, cluster_columns = FALSE,
            show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
            text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
       )
}
In [162]:
plot_ic <- function(gene){
    sub <- as.numeric(t(dat[which(dat$TF==gene),grep("in_centrality",colnames(dat))]))
    sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
    ## Cell types
    rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
    ## Transition
    colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
    # Reorder rows
    sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
    col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))

    Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
            col = col_fun, column_title = gene, column_title_gp = gpar(fontsize = 12, fontface = "bold"), 
            cluster_rows = FALSE, cluster_columns = FALSE,
            show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
            text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
       )
}
In [163]:
plot_dc <- function(gene){
    sub <- as.numeric(t(dat[which(dat$TF==gene),grep("degree_centrality",colnames(dat))]))
    sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
    ## Cell types
    rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
    ## Transition
    colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
    # Reorder rows
    sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
    col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))

    Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
            col = col_fun, column_title = gene, column_title_gp = gpar(fontsize = 12, fontface = "bold"), 
            cluster_rows = FALSE, cluster_columns = FALSE,
            show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
            text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
       )
}
In [164]:
plot_blank <- function(gene){
    sub <- as.numeric(t(dat[which(dat$TF==gene),grep("betweenness_centrality",colnames(dat))]))
    sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
    ## Cell types
    rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
    ## Transition
    colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
    # Reorder rows
    sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
    col_fun = colorRamp2(c(0, 0.001, 1), c('white',"white", "white"))

    Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
            col = col_fun, column_title_gp = gpar(fontsize = 12, fontface = "bold"), 
            cluster_rows = FALSE, cluster_columns = FALSE,
            show_column_names = FALSE, show_row_names = TRUE
       )
}
In [165]:
# Combine the top three centralies 
sub <- dat[,grep("betweenness_centrality|in_centrality|out_centrality",colnames(dat))]
sub <- as.data.frame(sapply(sub, as.numeric))
rownames(sub) <- dat$TF
In [166]:
head(sub)
A data.frame: 6 x 150
atri_out_centrality_1atri_in_centrality_1atri_betweenness_centrality_1tri_out_centrality_1tri_in_centrality_1tri_betweenness_centrality_1lrc_out_centrality_1lrc_in_centrality_1lrc_betweenness_centrality_1cor_out_centrality_1...pro_betweenness_centrality_5xyl_out_centrality_5xyl_in_centrality_5xyl_betweenness_centrality_5phl_out_centrality_5phl_in_centrality_5phl_betweenness_centrality_5col_out_centrality_5col_in_centrality_5col_betweenness_centrality_5
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>...<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
BZIP90.00000000.000000.00000000.00000000.0000000000.00000000.00000000.0000000.00000000.0000000...0.94924080.000000000.00000000.0000000000.936236390.054331860.9271092000
AT3G434300.00000000.000000.00000000.00000000.0000000000.00000000.00000000.0000000.00000000.0000000...1.00000000.012765960.13076920.0030108170.119751170.095447870.9688674000
GATA20.99530520.557060.57871530.96103900.3868312760.98946770.17647060.4961240.99102660.8266254...0.00000000.000000000.00000000.0000000000.000000000.000000000.0000000000
LEP0.00000000.000000.00000000.15584420.0082304530.00000000.00000000.0000000.00000000.0000000...0.00000000.000000000.00000000.0000000000.000000000.000000000.0000000000
MYB200.00000000.000000.00000000.00000000.0000000000.00000000.00000000.0000000.00000000.0000000...0.98855680.051063830.13461540.0000000000.001555210.010279000.0000000000
OBP20.00000000.000000.00000000.00000000.0000000000.00000000.00000000.0000000.00000000.0000000...0.12891530.000000000.00000000.0000000000.877138410.417033770.4722289000
In [167]:
bc_rank <- data.frame(all=rowSums(sub),atri=rowSums(sub[,grep("^atri_",colnames(sub))]),tri=rowSums(sub[,grep("^tri_",colnames(sub))])
                     ,cor=rowSums(sub[,grep("^cor_",colnames(sub))]),end=rowSums(sub[,grep("^end_",colnames(sub))])
                     ,per=rowSums(sub[,grep("^per_",colnames(sub))]),pro=rowSums(sub[,grep("^pro_",colnames(sub))])
                     ,xyl=rowSums(sub[,grep("^xyl_",colnames(sub))]),phl=rowSums(sub[,grep("^phl_",colnames(sub))])
                     ,lrc=rowSums(sub[,grep("^lrc_",colnames(sub))]),col=rowSums(sub[,grep("^col_",colnames(sub))]))
In [168]:
bc_rank$GeneID <- wanted_TFs$GeneID[match(rownames(bc_rank),wanted_TFs$Name)]
In [169]:
head(bc_rank)
A data.frame: 6 x 12
allatritricorendperproxylphllrccolGeneID
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr>
BZIP929.194440.0000000.0000000.0000000.01983748 9.05092129 8.86776250.0568708211.19905212 0.000000.00000000AT5G24800
AT3G4343034.919870.0000000.0000000.0000000.0168412812.12719380 9.50790474.47480476 8.79312886 0.000000.00000000AT3G43430
GATA232.602746.8767345.8442581.9380352.47836267 0.03634172 0.12344380.02555554 0.0273759411.826593.42603973AT2G45050
LEP34.899384.7381385.6082890.0000005.4851744411.78585516 4.19851510.14260467 2.92113981 0.000000.01966089AT5G13910
MYB2030.032400.0000000.0000000.0000000.3196843110.6308911010.98124674.08713837 4.01344128 0.000000.00000000AT1G66230
OBP220.546270.0000000.0000000.0000000.00000000 5.48240701 5.44166620.00000000 9.62219734 0.000000.00000000AT1G07640

Atrichoblast¶

In [178]:
atri_rank <- bc_rank[which(bc_rank$atri*2 > bc_rank$all),]%>% arrange(desc(atri))
atri_rank$GeneName <- rownames(atri_rank)
In [179]:
atri_rank
A data.frame: 44 x 13
allatritricorendperproxylphllrccolGeneIDGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><chr>
GL210.137921797.998920030.3064551751.6478652770.0817831750.0000000000.0000000000.0000000000.0000000000.1028981240.000000000AT1G79840GL2
TTG2 7.891246447.646714990.1543109240.0635456730.0266748530.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT2G37260TTG2
MYB2311.764292657.424416182.5479432391.6890518690.0000000000.0000000000.0000000000.0000000000.0000000000.0904230290.012458333AT5G40330MYB23
MYB45 8.447346504.934611680.2574950073.2552398160.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT3G48920MYB45
TRY 9.296440624.845714480.3069144081.2815554070.9443595110.0050981900.0000000000.0000000000.0477873810.1728986171.692112629AT5G53200TRY
NAC6 5.013689834.612002100.2500836680.0897547270.0254253940.0000000000.0000000000.0000000000.0000000000.0091415830.027282363AT5G39610NAC6
WRKY45 6.497906034.351442160.6357071230.1190999880.0000000000.0000000000.1996226800.0729352730.4548574830.0597547380.604486579AT3G01970WRKY45
AT3G05860 4.553505803.808640790.7448650090.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT3G05860AT3G05860
HB17 6.339283053.800858600.5639489020.1162040800.0000000000.0000000000.0482501571.5799695480.1478207230.0000000000.082231041AT2G01430HB17
AT2G28710 3.819281103.439817610.2930767390.0328324370.0100345000.0000000000.0000000000.0000000000.0000000000.0000000000.043519813AT2G28710AT2G28710
FIT 4.012788712.951553720.7483422980.0000000000.0171823640.0000000000.0000000000.0000000000.0000000000.1867142220.108996107AT2G28160FIT
MC2 3.083000592.831014180.2519864040.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT4G25110MC2
BNQ3 3.974644332.404539360.0667724510.0000000000.0000000000.0000000000.0000000000.0000000000.0000000001.5033325170.000000000AT3G47710BNQ3
WRKY61 4.326827532.254718571.9788239350.0932850300.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT1G18860WRKY61
HB24 2.620564442.230050050.1069572570.0338191430.0000000000.0000000000.2303946680.0193433200.0000000000.0000000000.000000000AT2G18350HB24
MEA 2.182978792.177278930.0056998560.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT1G02580MEA
OFP18 1.861783891.837036420.0247474750.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT3G52540OFP18
DAR4 2.988953791.755523650.0537117200.0530101040.4021887410.2466284830.2371681730.0000000000.0000000000.0743607790.166362147AT5G17890DAR4
AT5G22890 2.163564291.606543550.3209727030.1229568290.0000000000.0000000000.0000000000.0000000000.0000000000.0187290970.094362106AT5G22890AT5G22890
AT1G14600 1.453407951.439028720.0000000000.0000000000.0143792310.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT1G14600AT1G14600
RMR1 1.636102581.280566900.0363468830.0000000000.0575769530.0685534300.0859026480.0818879380.0252678270.0000000000.000000000AT5G66160RMR1
WRKY13 1.330316021.263348150.0000000000.0669678670.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT4G39410WRKY13
WRKY47 1.579690110.987892560.2694169440.1440092660.1783713430.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT4G01720WRKY47
AT3G07260 1.207876880.920789620.0000000000.0736753480.1137338730.0111368810.0000000000.0000000000.0000000000.0110199120.077521244AT3G07260AT3G07260
AT2G18670 1.644492460.859166300.3207153290.2294665620.0143397780.0000000000.0000000000.0000000000.0081720640.0854560130.127176412AT2G18670AT2G18670
NF-YC12 1.247592240.777422870.0000000000.0046675020.0000000000.0127317770.0000000000.0898020040.0000000000.1055166220.257451465AT5G38140NF-YC12
AT3G13840 0.764299320.722598030.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.041701293AT3G13840AT3G13840
DDL 1.177903880.624447340.0674087890.0514328010.1011136810.0793406600.0735214470.0000000000.0125391310.0341254280.133974606AT3G20550DDL
PIE1 1.006128790.568269330.0000000000.0000000000.0563842200.0956427190.0995550850.0057597410.0290675240.0394890770.111961095AT3G12810PIE1
AT4G31650 0.682210050.454617620.2275924280.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT4G31650AT4G31650
NAC069 0.843502780.442045930.0865044880.0000000000.0050388300.0000000000.0000000000.0000000000.0000000000.1350408230.174872710AT4G01550NAC069
AT4G01350 0.755595140.409661360.1165911610.0404660250.0000000000.0000000000.0000000000.0000000000.0000000000.1888765930.000000000AT4G01350AT4G01350
NLP4 0.509178680.394725820.0000000000.0274969350.0000000000.0000000000.0175436610.0000000000.0588582510.0000000000.010554010AT1G20640NLP4
PHE1 0.564481160.347677530.2168036310.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT1G65330PHE1
HSFB3 0.537392240.342113280.0000000000.1772883920.0000000000.0129769060.0050136690.0000000000.0000000000.0000000000.000000000AT2G41690HSFB3
AT2G19260 0.532447480.287698960.0580407250.0000000000.0082292870.0200791400.0510427150.0669112340.0272245740.0000000000.013220848AT2G19260AT2G19260
ULT2 0.395971080.219415190.0000000000.0000000000.1765558910.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT2G20825ULT2
RRS1 0.284336840.172757530.0353748820.0000000000.0278358070.0000000000.0000000000.0269687330.0115624760.0037726360.006064778AT5G45260RRS1
AT5G07400 0.267319300.166764030.0000000000.0098299820.0134149920.0464559210.0125557820.0000000000.0000000000.0060015770.012297022AT5G07400AT5G07400
LBD26 0.115958370.088419320.0206847040.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.006854354AT3G27940LBD26
AT4G18110 0.081102030.070351670.0107503610.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT4G18110AT4G18110
AT4G38070 0.055510530.033126640.0000000000.0000000000.0150146660.0000000000.0073692290.0000000000.0000000000.0000000000.000000000AT4G38070AT4G38070
AT4G14225 0.043580490.028285570.0117916270.0000000000.0000000000.0035032930.0000000000.0000000000.0000000000.0000000000.000000000AT4G14225AT4G14225
PRR3 0.037022990.026384610.0000000000.0000000000.0000000000.0106383720.0000000000.0000000000.0000000000.0000000000.000000000AT5G60100PRR3
In [180]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(atri_rank[1:10,], aes(x=reorder(GeneName, atri, decreasing = FALSE),  y=atri)) + geom_point(size=4)+ 
  labs(title="Atrichoblast-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [181]:
write.csv(atri_rank,"Atrichoblast_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [182]:
tf_rank <- atri_rank %>% rownames(.)
In [183]:
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [184]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [185]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Atrichoblast ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image
In [186]:
q1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3])
q2 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3])
q3 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3])

q1 <- grid.grabExpr(draw(q1))
q2 <- grid.grabExpr(draw(q2))
q3 <- grid.grabExpr(draw(q3))

options(repr.plot.width=6, repr.plot.height=8)
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q1,nrow=2,rel_heights = c(1, 8))
          ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q2,nrow=2,rel_heights = c(1, 8))
          ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q3,nrow=2,rel_heights = c(1, 8)),nrow=3)
No description has been provided for this image

Trichoblast¶

In [187]:
tri_rank <- bc_rank[which(bc_rank$tri*2 > bc_rank$all),]%>% arrange(desc(tri))
tri_rank$GeneName <- rownames(tri_rank)
In [188]:
tri_rank
A data.frame: 57 x 13
allatritricorendperproxylphllrccolGeneIDGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><chr>
AT3G53370 9.481562640.6303961688.272266990.0000000000.0000000000.2643793070.0321375640.2601656080.0222170080.0000000000.000000000AT3G53370AT3G53370
LRL3 7.559719310.3283395477.231379770.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT5G58010LRL3
RHD6 7.621728220.5990613577.009364220.0000000000.0000000000.0000000000.0000000000.0000000000.0133026400.0000000000.000000000AT1G66470RHD6
AT4G09100 6.154242620.0190342506.135208370.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT4G09100AT4G09100
WRKY6511.090695912.6272643626.090645830.0681662750.2927561930.0000000000.0000000000.0000000000.0000000001.3588091220.653054119AT1G29280WRKY65
ATMYC1 9.912079082.5316397896.050622151.0429490130.2270534230.0598147000.0000000000.0000000000.0000000000.0000000000.000000000AT4G00480ATMYC1
RSL4 5.567410480.0662481525.501162320.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT1G27740RSL4
RSL1 7.208964861.0929900715.097931480.0000000001.0180433120.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT5G37800RSL1
OFP13 6.209478060.5951482964.789054530.6498667980.0975020130.0000000000.0000000000.0000000000.0000000000.0779064310.000000000AT5G04820OFP13
RSL2 4.073528370.0000000004.073528370.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT4G33880RSL2
ZF1 4.931163040.1129954093.709903720.0000000000.0000000000.0000000000.0000000000.4618636310.0000000000.6464002860.000000000AT5G67450ZF1
ESE3 4.658718510.0886123873.600259060.9698470640.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT5G25190ESE3
AGL87 3.401583160.7889022832.612680880.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT1G22590AGL87
AT5G06800 2.946966960.3358036362.601017300.0073871440.0000000000.0000000000.0000000000.0000000000.0027588780.0000000000.000000000AT5G06800AT5G06800
MYB47 2.595383950.2197997932.094739660.0000000000.0170428350.0000000000.0000000000.0000000000.0146315140.0418803030.207289836AT1G18710MYB47
AT1G11490 3.280036131.4276520711.852384060.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT1G11490AT1G11490
AT5G56200 1.813963820.0000000001.813963820.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT5G56200AT5G56200
RL6 1.881637200.0730556611.660875670.0000000000.0000000000.0000000000.0327401210.0000000000.0514149270.0635508220.000000000AT1G75250RL6
AT4G39160 1.962225240.1394014301.646740130.0000000000.0130789150.0406069780.0211892340.0076254120.0212849060.0128269620.059471269AT4G39160AT4G39160
AT5G04390 1.782072160.0000000001.376815210.0000000000.0000000000.0000000000.0000000000.4052569480.0000000000.0000000000.000000000AT5G04390AT5G04390
RAP2.11 1.365646060.0000000001.348588350.0000000000.0043812240.0000000000.0000000000.0126764820.0000000000.0000000000.000000000AT5G19790RAP2.11
AT1G79220 2.111788580.1056277921.328458140.3524660220.1071547000.1173673050.0301684550.0542672040.0162789610.0000000000.000000000AT1G79220AT1G79220
MBD4 2.042951660.3055373281.325594980.0000000000.0112414910.0000000000.0000000000.0000000000.0000000000.1612156360.239362226AT3G63030MBD4
AT1G02040 1.333831760.0000000001.281104780.0000000000.0000000000.0000000000.0000000000.0527269840.0000000000.0000000000.000000000AT1G02040AT1G02040
AT3G55080 2.378920700.3086581441.264942440.3560052510.1999363260.1137571410.0073692290.0077881380.0000000000.0977556520.022708379AT3G55080AT3G55080
AT2G05160 1.211847080.0165300391.195317040.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT2G05160AT2G05160
TCP24 1.168859850.0000000001.119183480.0000000000.0000000000.0000000000.0000000000.0000000000.0496763700.0000000000.000000000AT1G30210TCP24
AT5G07900 1.994293450.2049605471.018471030.1084125640.0414411550.0361516040.1075364960.3089891550.1393056740.0290252310.000000000AT5G07900AT5G07900
MED6 1.598792820.2478837810.854181520.0255808860.1947773540.0785173260.0538661600.0830476310.0339441940.0269939700.000000000AT3G21350MED6
GL3 0.946866150.2340441350.591904840.0821215250.0387956520.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT5G41315GL3
LOL2 1.085624760.1682649420.588964570.0829346090.0767119960.0270830360.0000000000.0129000210.0125212150.0793785070.036865854AT4G21610LOL2
RAD54 1.133492490.1032712400.572044370.0000000000.0000000000.0207062590.0808594550.2262457990.0000000000.0714988790.058866488AT3G19210RAD54
SUVR4 0.600295980.0499357790.490622690.0046675020.0000000000.0000000000.0000000000.0000000000.0000000000.0095573440.045512671AT3G04380SUVR4
PRR9 0.532347540.0128449610.373749070.0000000000.0141729140.0000000000.0238041210.0162029460.0063942820.0324446680.052734578AT2G46790PRR9
AT2G17600 0.423087680.0000000000.324607550.0984801280.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT2G17600AT2G17600
NAC005 0.321961480.0154320990.306529380.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT1G02250NAC005
AT3G51470 0.455046110.1095681880.281436740.0000000000.0000000000.0035032930.0223237920.0382141020.0000000000.0000000000.000000000AT3G51470AT3G51470
AT1G61960 0.302997860.0085633080.275016690.0000000000.0000000000.0082991910.0111186750.0000000000.0000000000.0000000000.000000000AT1G61960AT1G61960
EIL2 0.265319720.0000000000.265319720.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT5G21120EIL2
EMB1789 0.384187300.0085161900.254376310.0000000000.0314381130.0129775540.0211536230.0446324160.0110930980.0000000000.000000000AT5G56930EMB1789
AT2G01060 0.490762770.0388596550.249422680.0312499930.0412456410.0203873470.0000000000.0090340420.0251520120.0130784710.062332929AT2G01060AT2G01060
LBD23 0.244963000.0000000000.244963000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT3G26620LBD23
BPC5 0.276976060.0213250980.233709110.0000000000.0000000000.0070065870.0000000000.0000000000.0000000000.0000000000.014935261AT4G38910BPC5
AT2G20030 0.198159260.0000000000.198159260.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT2G20030AT2G20030
AT2G24830 0.201598810.0000000000.124058630.0000000000.0357757640.0058704890.0000000000.0077453820.0000000000.0000000000.028148549AT2G24830AT2G24830
AT5G06420 0.213278390.0361532800.119947400.0075103660.0127468420.0106383720.0000000000.0262821290.0000000000.0000000000.000000000AT5G06420AT5G06420
ASG3 0.203562970.0000000000.115604620.0000000000.0030275450.0442610480.0174397870.0057597410.0174702310.0000000000.000000000AT2G44980ASG3
SUVH2 0.136928780.0000000000.108001360.0000000000.0062946380.0047063770.0000000000.0000000000.0179264070.0000000000.000000000AT2G33290SUVH2
AT4G12850 0.155291580.0103761930.087088760.0000000000.0076599130.0000000000.0000000000.0294496080.0207171050.0000000000.000000000AT4G12850AT4G12850
LDL2 0.112159340.0000000000.070476640.0000000000.0040438050.0000000000.0000000000.0376388850.0000000000.0000000000.000000000AT3G13682LDL2
AT2G14760 0.053098080.0000000000.053098080.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT2G14760AT2G14760
IAA34 0.058403620.0000000000.049617050.0000000000.0000000000.0000000000.0087865740.0000000000.0000000000.0000000000.000000000AT1G15050IAA34
AT5G45113 0.044227990.0000000000.044227990.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT5G45113AT5G45113
BBX17 0.047204240.0000000000.037878580.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.009325654AT1G49130BBX17
LBD21 0.025324680.0000000000.025324680.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT3G11090LBD21
ZFP8 0.017588730.0000000000.017588730.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.000000000AT2G41940ZFP8
IAA32 0.019473800.0000000000.012186480.0000000000.0000000000.0000000000.0072873240.0000000000.0000000000.0000000000.000000000AT2G01200IAA32
In [189]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(tri_rank[1:10,], aes(x=reorder(GeneName, tri, decreasing = FALSE),  y=tri)) + geom_point(size=4)+ 
  labs(title="Trichoblast-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [190]:
write.csv(tri_rank,"Trichoblast_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [191]:
## Top20 only
tf_rank <- tri_rank %>% rownames(.)
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [192]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [193]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Trichoblast ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image
In [194]:
q1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3])
q2 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3])
q3 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3])

q1 <- grid.grabExpr(draw(q1))
q2 <- grid.grabExpr(draw(q2))
q3 <- grid.grabExpr(draw(q3))

options(repr.plot.width=6, repr.plot.height=8)
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q1,nrow=2,rel_heights = c(1, 8))
          ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q2,nrow=2,rel_heights = c(1, 8))
          ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q3,nrow=2,rel_heights = c(1, 8)),nrow=3)
No description has been provided for this image

Cortex¶

In [195]:
cor_rank <- bc_rank[which(bc_rank$cor*2 > bc_rank$all),]%>% arrange(desc(cor))
cor_rank$GeneName <- rownames(cor_rank)
In [196]:
cor_rank
A data.frame: 28 x 13
allatritricorendperproxylphllrccolGeneIDGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><chr>
MYB868.331624712.754195600.2535381135.208152020.0073875340.0000000000.0000000000.075042400.0203770540.0129319960.000000000AT5G26660MYB86
AT2G383004.482824270.220064110.0000000004.262760160.0000000000.0000000000.0000000000.000000000.0000000000.0000000000.000000000AT2G38300AT2G38300
AT1G722105.535710230.271081480.0056998563.995820570.9902121390.0000000000.1135038190.000000000.1265640310.0062430320.026585297AT1G72210AT1G72210
AT2G426604.450271230.651964700.0000000003.798306530.0000000000.0000000000.0000000000.000000000.0000000000.0000000000.000000000AT2G42660AT2G42660
AT3G614205.056667240.405926620.1141210323.709082620.6364155770.0047063770.0963180750.000000000.0588049760.0312919660.000000000AT3G61420AT3G61420
tny5.480075940.134793991.7690933313.561766810.0000000000.0000000000.0084613120.000000000.0059604960.0000000000.000000000AT5G25810tny
AT1G057105.615806760.136337330.0078785083.409790011.2705505110.0201239590.1053245810.000000000.5956643610.0236343370.046503165AT1G05710AT1G05710
JKD6.264296090.354571010.0000000003.201880272.6986356540.0000000000.0000000000.000000000.0000000000.0000000000.009209155AT5G03150JKD
RGL35.103730070.330891000.2227636293.146441020.1210868490.0448884180.0311483070.387016670.0000000000.5015924280.317901759AT5G17490RGL3
LAF14.571849630.894765350.0110836363.052536300.6038768200.0000000000.0000000000.000000000.0000000000.0095875140.000000000AT4G25560LAF1
SIGF3.154782320.123341600.0378921492.624976590.1718349830.0091749930.0000000000.127191120.0000000000.0603708890.000000000AT2G36990SIGF
HAM34.070163080.495909500.0633477632.473769460.2293025200.0246225440.0721630200.000000000.0329566650.4213328020.256758806AT4G00150HAM3
LRP14.309789670.068385220.0000000002.467709320.3446137000.7885478220.4516924510.000000000.1888411570.0000000000.000000000AT5G12330LRP1
JAZ63.768806100.101557590.1049909702.359730370.1570729940.1156166860.2421385600.302084180.2533981810.0340029930.098213579AT1G72450JAZ6
AT1G643804.034569871.493828980.0407555382.024271830.4310956170.0000000000.0282768290.000000000.0100980520.0062430320.000000000AT1G64380AT1G64380
WRKY693.169642940.217776750.7055428441.700805310.0918706140.0000000000.0000000000.000000000.0070744140.1755135480.271059461AT3G58710WRKY69
ETR22.309428290.320017160.0000000001.617684210.1681507220.0000000000.0408666340.034320030.0193783500.0196209590.089390226AT3G23150ETR2
AT4G280302.748432640.799075600.4190320011.410719460.1071195220.0000000000.0000000000.000000000.0000000000.0124860650.000000000AT4G28030AT4G28030
WRKY572.656149590.442397000.0000000001.381518080.0498259140.0330436570.0000000000.417200870.1886347710.0931530490.050376249AT1G69310WRKY57
SIGE2.295798850.329772520.2157780471.152535330.0229885580.0000000000.0000000000.000000000.0000000000.0301782000.544546190AT5G24120SIGE
IDD41.352555950.000000000.0000000001.123331030.2292249220.0000000000.0000000000.000000000.0000000000.0000000000.000000000AT2G02080IDD4
GLK21.518801980.029832750.0000000001.061847670.0169721500.1831534640.2074745050.000000000.0195214490.0000000000.000000000AT5G44190GLK2
OFP121.302712810.154465420.0362580920.955110270.1568790350.0000000000.0000000000.000000000.0000000000.0000000000.000000000AT1G05420OFP12
PIF70.807117540.000000000.0498751520.516779080.0020112850.0000000000.0000000000.000000000.2384520280.0000000000.000000000AT5G61270PIF7
AT3G189600.656564930.126142260.0000000000.449033810.0248446200.0000000000.0565442420.000000000.0000000000.0000000000.000000000AT3G18960AT3G18960
AT2G468100.350629100.074996110.0204872800.218864460.0334916840.0000000000.0027895730.000000000.0000000000.0000000000.000000000AT2G46810AT2G46810
HB280.119296270.000000000.0090905010.070658910.0395468600.0000000000.0000000000.000000000.0000000000.0000000000.000000000AT3G50890HB28
PIL50.044466250.010497540.0088930770.025075630.0000000000.0000000000.0000000000.000000000.0000000000.0000000000.000000000AT2G20180PIL5
In [197]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(cor_rank[1:10,], aes(x=reorder(GeneName, cor, decreasing = FALSE),  y=cor)) + geom_point(size=4)+ 
  labs(title="Cortex-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [198]:
write.csv(cor_rank,"Cortex_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [199]:
tf_rank <- cor_rank %>% rownames(.)
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
#p4 <- plot_bc(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
#p8 <- plot_oc(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
#p12 <- plot_ic(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")
In [200]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
#p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
#p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
#p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [201]:
options(repr.plot.width=24, repr.plot.height=9)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Cortex ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,nrow=3),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,nrow=3),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,nrow=3),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image
In [202]:
## Top 10 only
tf_rank <- cor_rank %>% rownames(.)
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
#p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
#p4 <- plot_bc(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
#p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
#p8 <- plot_oc(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
#p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
#p12 <- plot_ic(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")
In [203]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
#p3 <- grid.grabExpr(draw(p3))
#p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
#p7 <- grid.grabExpr(draw(p7))
#p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
#p11 <- grid.grabExpr(draw(p11))
#p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [204]:
options(repr.plot.width=24, repr.plot.height=5)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Cortex ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,nrow=2),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,nrow=2),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,nrow=2),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image
In [205]:
q1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3])
q2 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3])
q3 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3])

q1 <- grid.grabExpr(draw(q1))
q2 <- grid.grabExpr(draw(q2))
q3 <- grid.grabExpr(draw(q3))

options(repr.plot.width=6, repr.plot.height=8)
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q1,nrow=2,rel_heights = c(1, 8))
          ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q2,nrow=2,rel_heights = c(1, 8))
          ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q3,nrow=2,rel_heights = c(1, 8)),nrow=3)
No description has been provided for this image

Endodermis¶

In [170]:
end_rank <- bc_rank[which(bc_rank$end*2 > bc_rank$all),]%>% arrange(desc(end))
end_rank$GeneName <- rownames(end_rank)
In [171]:
end_rank
A data.frame: 35 x 13
allatritricorendperproxylphllrccolGeneIDGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><chr>
MYB3611.4656872750.000000000.0000000000.00000000011.2958540220.0000000000.0000000000.0000000000.0000000000.0000000000.16983325AT5G57620MYB36
MYB7410.8732810010.000000000.0000000000.067935848 8.8014052510.0000000000.1387826830.3417258750.1010520720.2116719391.21070733AT4G05100MYB74
MYB68 7.4755007850.000000000.0000000000.000000000 7.3968950450.0000000000.0426810160.0000000000.0000000000.0000000000.03592472AT5G65790MYB68
MYB310.7572117122.243706300.1085311030.177466813 7.3622221260.0137386440.0000000000.5549562340.1013250510.1468050070.04846043AT1G22640MYB3
RAX2 4.3193211520.446354920.0128205130.318529974 3.3909178890.1506978520.0000000000.0000000000.0000000000.0000000000.00000000AT2G36890RAX2
BLJ 3.2929188170.000000000.0000000000.039632918 3.2532858990.0000000000.0000000000.0000000000.0000000000.0000000000.00000000AT1G14580BLJ
SCR 3.3748869670.099545930.0000000000.113936058 3.1064105900.0000000000.0000000000.0000000000.0000000000.0000000000.05499439AT3G54220SCR
TLP11 3.7730960010.000000000.2828296630.099566917 2.0406456431.1544510060.1108521390.0000000000.0728782130.0118724180.00000000AT5G18680TLP11
chr31 1.7882772610.000000000.0000000000.000000000 1.7467743000.0000000000.0000000000.0355424650.0059604960.0000000000.00000000AT1G05490chr31
KNAT2 2.9897690480.000000000.0000000000.000000000 1.5503271560.0000000000.0000000000.0000000001.4394418920.0000000000.00000000AT1G70510KNAT2
BIB 1.3085653690.000000000.0000000000.000000000 1.3085653690.0000000000.0000000000.0000000000.0000000000.0000000000.00000000AT3G45260BIB
RVN 1.6121715180.136246790.0000000000.524083634 0.9518410980.0000000000.0000000000.0000000000.0000000000.0000000000.00000000AT2G02070RVN
bZIP58 1.4402002480.000000000.0000000000.000000000 0.9323356260.5078646230.0000000000.0000000000.0000000000.0000000000.00000000AT1G13600bZIP58
AGL42 1.1840951720.010084360.0000000000.099999664 0.8911348720.0892920980.0252412290.0000000000.0381701870.0000000000.03017276AT5G62165AGL42
MYB122 1.4835767450.000000000.0000000000.447435782 0.8302181010.1971165250.0088063360.0000000000.0000000000.0000000000.00000000AT1G74080MYB122
AGL102 0.8581811110.000000000.0000000000.000000000 0.6106332630.0000000000.0000000000.0000000000.0000000000.0000000000.24754785AT1G47760AGL102
AT5G41920 0.8223297960.067986560.1648228310.000000000 0.4968719960.0378544380.0000000000.0000000000.0000000000.0000000000.05479397AT5G41920AT5G41920
AT2G43140 0.4763684000.000000000.0000000000.014018844 0.4103540800.0000000000.0000000000.0161386220.0000000000.0000000000.03585685AT2G43140AT2G43140
AT4G38340 0.4316999480.000000000.0000000000.000000000 0.3088544290.0000000000.0000000000.0000000000.0000000000.0000000000.12284552AT4G38340AT4G38340
AT2G43280 0.4551245660.000000000.0088930770.000000000 0.2597566760.0745480950.0088509910.0077881380.0023364490.0271629780.06578816AT2G43280AT2G43280
MYB70 0.3970617820.025199150.0000000000.004667502 0.2450587390.0000000000.0620350460.0000000000.0000000000.0287737220.03132762AT2G23290MYB70
SIGA 0.3207763280.000000000.0000000000.000000000 0.1882999660.0648156280.0000000000.0000000000.0000000000.0000000000.06766073AT1G64860SIGA
AT4G00390 0.1609970920.011829950.0000000000.012925957 0.1362411820.0000000000.0000000000.0000000000.0000000000.0000000000.00000000AT4G00390AT4G00390
AT1G18335 0.2543685390.000000000.0575885960.000000000 0.1283002850.0035648000.0087788850.0386005740.0175353990.0000000000.00000000AT1G18335AT1G18335
GATA10 0.1917925030.042650200.0000000000.000000000 0.1193066490.0105543300.0192813270.0000000000.0000000000.0000000000.00000000AT1G08000GATA10
AT2G33720 0.1281902570.000000000.0000000000.000000000 0.1165697890.0000000000.0000000000.0116204680.0000000000.0000000000.00000000AT2G33720AT2G33720
HAG1 0.2185805940.000000000.0349800330.000000000 0.1110047880.0188024850.0073692290.0000000000.0000000000.0180137850.02841027AT3G54610HAG1
HSF3 0.2045363170.000000000.0000000000.000000000 0.1063923110.0119480340.0238979230.0077453820.0246166290.0073360180.02260002AT5G16820HSF3
AT3G18870 0.1418571300.000000000.0000000000.000000000 0.0756819070.0023671950.0000000000.0000000000.0409906580.0000000000.02281737AT3G18870AT3G18870
AMS 0.0770297860.000000000.0294432990.000000000 0.0475864860.0000000000.0000000000.0000000000.0000000000.0000000000.00000000AT2G16910AMS
4-Sep 0.0466289270.000000000.0000000000.000000000 0.0466289270.0000000000.0000000000.0000000000.0000000000.0000000000.00000000AT2G037104-Sep
AGL62 0.0180865880.000000000.0000000000.000000000 0.0180865880.0000000000.0000000000.0000000000.0000000000.0000000000.00000000AT5G60440AGL62
AGL13 0.0177219660.000000000.0000000000.000000000 0.0177219660.0000000000.0000000000.0000000000.0000000000.0000000000.00000000AT3G61120AGL13
TDF1 0.0148348860.000000000.0000000000.000000000 0.0148348860.0000000000.0000000000.0000000000.0000000000.0000000000.00000000AT3G28470TDF1
DUO1 0.0090401650.000000000.0000000000.000000000 0.0090401650.0000000000.0000000000.0000000000.0000000000.0000000000.00000000AT3G60460DUO1
In [173]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(end_rank[1:10,], aes(x=reorder(GeneName, end, decreasing = FALSE),  y=end)) + geom_point(size=4)+ 
  labs(title="Endodermis-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [209]:
write.csv(end_rank,"Endodermis_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [210]:
tf_rank <- end_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [211]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [212]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Endodermis ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image
In [213]:
tf_rank <- end_rank %>% rownames(.)
# Max 10
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
#p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
#p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
#p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
#p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
#p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
#p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [214]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
#p3 <- grid.grabExpr(draw(p3))
#p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
#p7 <- grid.grabExpr(draw(p7))
#p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
#p11 <- grid.grabExpr(draw(p11))
#p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [215]:
options(repr.plot.width=24, repr.plot.height=5)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Endodermis ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,nrow=2),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,nrow=2),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,nrow=2),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image
In [216]:
q1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5]) + plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10]) 
q2 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5]) + plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10]) 
q3 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5]) + plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10]) 

q1 <- grid.grabExpr(draw(q1))
q2 <- grid.grabExpr(draw(q2))
q3 <- grid.grabExpr(draw(q3))

options(repr.plot.width=16, repr.plot.height=8)
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q1,nrow=2,rel_heights = c(1, 8))
          ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q2,nrow=2,rel_heights = c(1, 8))
          ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q3,nrow=2,rel_heights = c(1, 8)),nrow=3)
No description has been provided for this image

Pericycle¶

In [217]:
per_rank <- bc_rank[which(bc_rank$per*2 > bc_rank$all),]%>% arrange(desc(per))
per_rank$GeneName <- rownames(per_rank)
In [218]:
per_rank
A data.frame: 27 x 13
allatritricorendperproxylphllrccolGeneIDGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><chr>
AT4G2910015.80833900.000000000.0000000.000000000.661750638.89157943.669773280.0000000002.5852356820.000000000.000000000AT4G29100AT4G29100
MYBC112.40424870.000000000.0000000.317612612.381524298.71301710.941755840.0000000000.0449176050.000000000.005421276AT2G40970MYBC1
LBD1615.81398800.000000000.0000000.048919041.054146218.49047823.899390770.0000000001.8820230630.000000000.439030705AT2G42430LBD16
LRL114.13451310.024974732.6673450.000000001.256835967.81071221.409828650.0000000000.9648164980.000000000.000000000AT2G24260LRL1
NUC 8.36792240.100796600.0000000.889280410.199170765.80165581.326469290.0000000000.0505494960.000000000.000000000AT5G44160NUC
bZIP4 7.87762830.000000000.0000000.000000000.025348314.02407771.588328111.4569917370.7828824400.000000000.000000000AT1G59530bZIP4
AT3G21330 5.50463780.173465940.0000000.000000001.230503114.00617620.094492530.0000000000.0000000000.000000000.000000000AT3G21330AT3G21330
LBD14 4.37527780.000000000.0000000.000000000.309141983.93723040.000000000.1289054220.0000000000.000000000.000000000AT2G31310LBD14
MGP 5.79592950.409911780.0000001.249805140.839534423.21933370.077344480.0000000000.0000000000.000000000.000000000AT1G03840MGP
IDD11 3.10048860.000000000.0000000.000000000.000000003.07672770.023760900.0000000000.0000000000.000000000.000000000AT3G13810IDD11
SOG1 4.35543780.017952980.0000000.000000000.022277702.74857631.153430910.0862102290.2866491460.034275730.006064778AT1G25580SOG1
AT1G26790 3.78777280.000000000.0000000.000000000.000000002.64678930.516451340.0000000000.6245321740.000000000.000000000AT1G26790AT1G26790
MYB34 4.10735960.155462520.0000000.022213880.803731322.38095090.407814460.0000000000.1588077420.089223290.089155443AT5G60890MYB34
GATA23 2.15294820.000000000.0000000.000000000.024908662.12803960.000000000.0000000000.0000000000.000000000.000000000AT5G26930GATA23
AT4G20970 2.06963460.000000000.0000000.000000000.000000001.97752280.039244920.0000000000.0528668700.000000000.000000000AT4G20970AT4G20970
AT5G23280 3.31367580.008516190.0000000.219665990.238706191.95195480.509176760.1848820630.2007738790.000000000.000000000AT5G23280AT5G23280
AT2G35430 2.57489260.166044620.0000000.000000000.111315781.80302070.138129100.0427285420.0986269740.059583520.155443322AT2G35430AT2G35430
SAP 3.18437160.081370090.0000000.086457981.175904661.75654110.084097810.0000000000.0000000000.000000000.000000000AT5G35770SAP
AT2G42040 2.18150100.000000000.0000000.017442040.357499941.46388000.282037430.0000000000.0606416160.000000000.000000000AT2G42040AT2G42040
ERF10 2.10445370.000000000.0000000.000000000.646184071.22181030.017439790.2190195450.0000000000.000000000.000000000AT1G03800ERF10
AT3G61550 1.26316900.000000000.0000000.000000000.073846671.03781380.012253230.0731736850.0000000000.013833000.052248677AT3G61550AT3G61550
AT3G50650 2.00717790.000000000.0000000.000000000.004996361.01559790.429135650.3681053520.1893426320.000000000.000000000AT3G50650AT3G50650
LBD29 1.04300500.000000000.0000000.000000000.000000000.57948010.407837540.0000000000.0556873400.000000000.000000000AT3G58190LBD29
WRKY67 0.57748850.000000000.0000000.000000000.004022570.44491650.045534630.0476181470.0353966380.000000000.000000000AT1G66550WRKY67
WOX14 0.30895860.000000000.0000000.000000000.000000000.25275330.014997780.0412075020.0000000000.000000000.000000000AT1G20700WOX14
AT2G20400 0.39263740.000000000.0000000.000000000.022954620.22036070.114548190.0059224670.0030236390.000000000.025827801AT2G20400AT2G20400
BOP2 0.17369590.000000000.0000000.000000000.000000000.17369590.000000000.0000000000.0000000000.000000000.000000000AT2G41370BOP2
In [219]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(per_rank[1:10,], aes(x=reorder(GeneName, per, decreasing = FALSE),  y=per)) + geom_point(size=4)+ 
  labs(title="Pericycle-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [220]:
write.csv(per_rank,"Pericycle_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [221]:
tf_rank <- per_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [222]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [223]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Pericycle ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image
In [224]:
q1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3])
q2 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3])
q3 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3])

q1 <- grid.grabExpr(draw(q1))
q2 <- grid.grabExpr(draw(q2))
q3 <- grid.grabExpr(draw(q3))

options(repr.plot.width=6, repr.plot.height=8)
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q1,nrow=2,rel_heights = c(1, 8))
          ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q2,nrow=2,rel_heights = c(1, 8))
          ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q3,nrow=2,rel_heights = c(1, 8)),nrow=3)
No description has been provided for this image

Procambium¶

In [225]:
pro_rank <- bc_rank[which(bc_rank$pro*2 > bc_rank$all),]%>% arrange(desc(pro))
pro_rank$GeneName <- rownames(pro_rank)
In [226]:
pro_rank
A data.frame: 13 x 13
allatritricorendperproxylphllrccolGeneIDGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><chr>
AT1G6166019.664481300.000000000.000000000.000000000.0275133151.3088612849.911791873.658917244.757397580.000000000.0000000AT1G61660AT1G61660
MYB8815.092344390.000000000.000000000.000000000.0000000000.5640393789.428544671.713206713.298026990.088526640.0000000AT2G02820MYB88
IAA1217.138385850.000000000.000000000.000000000.0000000000.3071580628.716227095.706929632.408071070.000000000.0000000AT1G04550IAA12
ABO314.907354830.131982910.000000000.012599420.0537414012.7966661588.239503371.320218372.352643200.000000000.0000000AT1G66600ABO3
RVE1 9.744527580.000000000.000000000.000000000.0542193420.5671625715.085163352.173302421.659917430.098190620.1065718AT5G17300RVE1
HB18 5.720410910.000000000.000000000.000000000.0000000000.0000000004.231450830.277915351.211044720.000000000.0000000AT1G70920HB18
HAT9 4.974347320.000000000.000000000.122094280.0081088460.3141510113.599050980.016953770.913988440.000000000.0000000AT2G22800HAT9
AT2G40200 4.479223240.000000000.086633530.000000000.0000000000.0189740842.897177290.019307621.457130710.000000000.0000000AT2G40200AT2G40200
NAC080 5.276610550.000000000.000000000.000000000.0288556550.3831496992.831673750.020847841.706816570.075139350.2301277AT5G07680NAC080
AT1G51200 3.288250400.100847540.305404270.000000000.0466036010.3499513941.712189240.465775030.174201840.019620960.1136565AT1G51200AT1G51200
AT1G10610 0.340395050.010910730.000000000.000000000.0020112850.0309319080.188091180.033757020.074692930.000000000.0000000AT1G10610AT1G10610
FRS12 0.233690510.000000000.000000000.000000000.0695980680.0000000000.164092440.000000000.000000000.000000000.0000000AT5G18960FRS12
AT1G74120 0.054780420.000000000.000000000.000000000.0092455470.0093847390.036150140.000000000.000000000.000000000.0000000AT1G74120AT1G74120
In [227]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(pro_rank[1:10,], aes(x=reorder(GeneName, pro, decreasing = FALSE),  y=pro)) + geom_point(size=4)+ 
  labs(title="Procambium-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [228]:
write.csv(pro_rank,"Procambium_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [229]:
tf_rank <- pro_rank %>% rownames(.)
# Max 30
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_blank(tf_rank[15])

p4 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p5 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p6 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_blank(tf_rank[15])

p7 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p8 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p9 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_blank(tf_rank[15])
In [230]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [231]:
options(repr.plot.width=24, repr.plot.height=10)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Procambium ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,nrow=3),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p4,p5,p6,nrow=3),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p7,p8,p9,nrow=3),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image

Phloem¶

In [232]:
phl_rank <- bc_rank[which(bc_rank$phl*2 > bc_rank$all),]%>% arrange(desc(phl))
phl_rank$GeneName <- rownames(phl_rank)
In [233]:
phl_rank
A data.frame: 40 x 13
allatritricorendperproxylphllrccolGeneIDGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><chr>
APL14.6093188710.000000000.0000000000.000000000.0000000000.1696373001.110603530.00000000013.3290780420.000000000.000000000AT1G79430APL
AT3G12730 9.0253082710.000000000.0000000000.000000000.0000000000.0000000000.012512560.000000000 9.0127957100.000000000.000000000AT3G12730AT3G12730
AT2G03500 8.3171639510.000000000.0000000000.000000000.0000000000.0929326050.018617570.000000000 8.2056137790.000000000.000000000AT2G03500AT2G03500
DOF2.413.2097646190.000000000.0000000000.000000000.0000000000.1510924844.508538010.765591862 7.7845422590.000000000.000000000AT2G37590DOF2.4
HCA2 7.8461922710.000000000.0000000000.000000000.0000000000.0895589390.149435300.000000000 7.6071980330.000000000.000000000AT5G62940HCA2
AT4G37180 8.3522775060.000000000.0000000000.000000000.0297228610.3693574630.311105140.098356502 7.4557144710.079767290.008253774AT4G37180AT4G37180
NAC020 8.4470182790.000000000.0000000000.000000000.0000000000.0414125181.440542300.211972030 6.7530914290.000000000.000000000AT1G54330NAC020
DOF6 8.5019828720.000000000.0000000000.000000000.0000000000.0340948700.327647251.414083851 6.7261569010.000000000.000000000AT3G45610DOF6
DAR2 8.2563037350.000000000.0000000000.000000000.0000000000.1707258421.371754510.000000000 6.7138233840.000000000.000000000AT2G39830DAR2
AT2G4494012.9384388210.000000000.0000000000.000000000.0468006932.6604695643.538225940.038214102 6.6547285200.000000000.000000000AT2G44940AT2G44940
NAC057 6.5555349700.000000000.0000000000.000000000.0000000000.0099917460.106209470.000000000 6.4393337490.000000000.000000000AT3G17730NAC057
AT5G02460 8.9008863150.000000000.0000000000.000000000.0000000000.2490274912.098334160.367268069 6.1862565970.000000000.000000000AT5G02460AT5G02460
AT5G41380 6.3058823790.000000000.0000000000.000000000.0000000000.0000000000.006234670.131992268 6.1676554420.000000000.000000000AT5G41380AT5G41380
GATA20 5.5196689030.000000000.0000000000.000000000.0000000000.1227028280.128703720.000000000 5.2682623540.000000000.000000000AT2G18380GATA20
AT1G63820 6.2948610230.000000000.0000000000.000000000.0025062701.8953519980.332735460.000000000 4.0642672910.000000000.000000000AT1G63820AT1G63820
bZIP19 5.4331422190.144616150.0540548450.047483500.0551693991.2247226420.257486400.021920640 3.6147566430.012932000.000000000AT4G35040bZIP19
WRKY32 5.5288168010.000000000.0000000000.017195600.0462844810.6100581421.599145990.000000000 3.1698899400.026214220.060028433AT4G30935WRKY32
AT1G49560 4.9506541300.707807730.0000000000.279272200.3270163550.0000000000.017439790.023209300 2.9988224720.262129020.334957268AT1G49560AT1G49560
NAC045 4.5601622470.000000000.0000000000.000000000.0040013350.0450414850.800635580.857306888 2.8460998640.007077100.000000000AT3G03200NAC045
REM22 3.1585701770.000000000.0000000000.000000000.0000000000.0261179490.300641070.088825649 2.7429855140.000000000.000000000AT3G17010REM22
AGL15 3.1197414180.000000000.0000000000.000000000.0050125390.0000000000.146360040.286023006 2.6823458360.000000000.000000000AT5G13790AGL15
MYB10 3.5481573360.000000000.0000000000.000000000.0000000000.0000000001.049731080.133287669 2.3651385840.000000000.000000000AT3G12820MYB10
AS1 3.8594037780.040115520.0059945260.105888350.0000000000.2003700391.009350740.426654519 2.0710300840.000000000.000000000AT2G37630AS1
AT5G63700 3.1705611380.021081280.0000000001.084278120.0000000000.0000000000.000000000.000000000 2.0521232730.013078470.000000000AT5G63700AT5G63700
WRI4 2.9029574780.033013680.0000000000.000000000.0413434720.0815808480.182427210.000000000 1.5309863980.748269470.285336401AT1G79700WRI4
SPL10 1.5927894230.000000000.0000000000.000000000.0080239050.0000000000.106148230.000000000 1.4094420270.000000000.069175260AT1G27370SPL10
ROS4 2.1138041350.053275270.0394579800.011644250.0109386010.4490285970.056422180.105796605 1.3548101360.032430510.000000000AT3G14980ROS4
WOX2 1.2382567580.000000000.0000000000.019740130.0252508860.0000000000.000000000.000000000 1.1932657460.000000000.000000000AT5G59340WOX2
NAC086 1.2126853240.000000000.0000000000.000000000.0065670170.0000000000.036576010.000000000 1.1695422970.000000000.000000000AT5G17260NAC086
bHLH11 1.4537460480.012880400.0000000000.000000000.0000000000.1859184520.028126250.000000000 1.0623575810.024798620.139664742AT4G36060bHLH11
ARF11 0.9010582140.000000000.0000000000.000000000.0118698210.0337359140.000000000.220173338 0.6352791410.000000000.000000000AT2G46530ARF11
SIGC 0.8516420890.024974730.0000000000.017110320.0107355570.0155909450.155314910.077881384 0.5398572930.010176940.000000000AT3G53920SIGC
AT1G64530 0.9570091980.047658620.0787675260.095757250.0925654570.0274279580.053424280.003879403 0.5195608870.037967820.000000000AT1G64530AT1G64530
AT1G58220 0.7944648160.000000000.0119890520.000000000.0199289940.0000000000.094076890.198104371 0.4146540050.011066400.044645107AT1G58220AT1G58220
NF-YB3 0.2965813840.000000000.0000000000.000000000.0000000000.0000000000.014781680.013385153 0.2684145530.000000000.000000000AT4G14540NF-YB3
AT5G63080 0.2989670010.000000000.0000000000.000000000.0187667640.0000000000.018617570.000000000 0.2043216530.050297670.006963346AT5G63080AT5G63080
AT3G46070 0.1593541550.000000000.0000000000.000000000.0000000000.0000000000.000000000.000000000 0.1155347330.043819420.000000000AT3G46070AT3G46070
AT4G03250 0.1308340200.000000000.0000000000.000000000.0073321340.0000000000.000000000.000000000 0.0964680220.000000000.027033864AT4G03250AT4G03250
AT3G06220 0.0940042170.000000000.0000000000.000000000.0000000000.0000000000.000000000.000000000 0.0940042170.000000000.000000000AT3G06220AT3G06220
AT3G52270 0.0094104190.000000000.0000000000.000000000.0000000000.0000000000.000000000.000000000 0.0094104190.000000000.000000000AT3G52270AT3G52270
In [234]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(phl_rank[1:10,], aes(x=reorder(GeneName, phl, decreasing = FALSE),  y=phl)) + geom_point(size=4)+ 
  labs(title="Phloem-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [235]:
write.csv(phl_rank,"Phloem_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [236]:
tf_rank <- phl_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [237]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [238]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Phloem ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image

Xylem¶

In [239]:
xyl_rank <- bc_rank[which(bc_rank$xyl*2 > bc_rank$all),]%>% arrange(desc(xyl))
xyl_rank$GeneName <- rownames(xyl_rank)
In [240]:
xyl_rank
A data.frame: 86 x 13
allatritricorendperproxylphllrccolGeneIDGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><chr>
AT1G6881017.0639190.000000000.0000000000.00000000.0000000000.081653215.14533764211.1570020.679926760.0000000000.00000000AT1G68810AT1G68810
DOF215.2229230.000000000.0000000000.00000001.1427312970.000000000.11026228110.6472850.086923650.0055331993.23018731AT3G21270DOF2
MYB46 9.9460990.000000000.0000000000.00000000.0000000000.000000000.000000000 9.9460990.000000000.0000000000.00000000AT5G12870MYB46
VND7 9.8550900.000000000.0000000000.00000000.0000000000.000000000.018704010 9.8363860.000000000.0000000000.00000000AT1G71930VND7
VND210.3753000.000000000.0000000000.00000000.0000000000.000000000.560639801 9.5934160.221243890.0000000000.00000000AT4G36160VND2
MYB83 8.9847860.000000000.0000000000.00000000.0000000000.000000000.000000000 8.9847860.000000000.0000000000.00000000AT3G08500MYB83
VND5 8.5008340.000000000.0000000000.00000000.0000000000.000000000.007369229 8.4934650.000000000.0000000000.00000000AT1G62700VND5
XND111.0663210.000000000.0000000000.00000000.0000000000.016889471.997901734 8.3892250.662304370.0000000000.00000000AT5G64530XND1
VND1 8.4116260.000000000.0000000000.00000000.0000000000.000000000.027164576 8.3844610.000000000.0000000000.00000000AT2G18060VND1
VND310.8047660.000000000.0000000000.00000000.0000000000.000000002.267029156 8.2346890.303048080.0000000000.00000000AT5G66300VND3
VND4 8.2643430.000000000.0000000000.00000000.0000000000.000000000.059818255 8.2045240.000000000.0000000000.00000000AT1G12260VND4
AT5G0351014.3642630.334501170.1059161800.00000000.1005927000.005098190.012500000 7.8434470.135097142.6449592013.18215109AT5G03510AT5G03510
IAA6 7.4490060.000000000.0000000000.00000000.0000000000.000000000.050609684 7.2865940.111802180.0000000000.00000000AT1G52830IAA6
BHLH3212.6938460.000000000.0000000000.00000000.9912843033.134665471.222152495 7.0773790.268365590.0000000000.00000000AT3G25710BHLH32
IAA813.6435340.133444120.0000000000.48686030.0528020340.131996613.677422098 6.9671600.440972250.5735513361.17932503AT2G22670IAA8
AT1G68200 6.8917040.000000000.0000000000.00000000.0000000000.000000000.000000000 6.8917040.000000000.0000000000.00000000AT1G68200AT1G68200
LBD18 8.3243060.000000000.0000000000.00000000.0000000000.000000000.000000000 6.7653550.000000000.0000000001.55895123AT2G45420LBD18
VND6 6.0424590.000000000.0000000000.00000000.0000000000.000000000.000000000 6.0424590.000000000.0000000000.00000000AT5G62380VND6
HB31 6.0003340.000000000.0000000000.00000000.0000000000.000000000.000000000 6.0003340.000000000.0000000000.00000000AT1G14440HB31
AT4G13620 8.3017330.000000000.0924391320.10640190.2392664941.973315330.063265152 5.4314500.395594750.0000000000.00000000AT4G13620AT4G13620
AT1G27660 9.5774480.000000000.0000000000.00000000.0000000003.244926660.841223229 5.4085320.082766680.0000000000.00000000AT1G27660AT1G27660
IAA3110.1208730.000000001.6060320280.00000000.0000000000.000000001.732273373 5.4068301.375737700.0000000000.00000000AT3G17600IAA31
ZHD3 5.3811290.000000000.0000000000.00000000.0000000000.000000000.000000000 5.3811290.000000000.0000000000.00000000AT2G02540ZHD3
BBX31 8.2900610.044426070.0078785080.12332650.0000000000.000000000.134382077 5.3016860.109205892.2638922390.30526388AT3G21890BBX31
AT1G66810 5.7091760.203626740.0564358180.00000000.0054741210.000000000.000000000 5.1892210.000000000.2544188050.00000000AT1G66810AT1G66810
BEE2 5.6244910.000000000.0000000000.00000000.4152678590.000000000.007587322 5.1451880.028690510.0000000000.02775774AT4G36540BEE2
HAT14 8.2187590.000000000.0000000000.00000000.0000000000.000000001.816622909 5.0593031.342832740.0000000000.00000000AT5G06710HAT14
LBD31 5.0365100.000000000.0000000000.00000000.0000000000.000000000.000000000 5.0365100.000000000.0000000000.00000000AT4G00210LBD31
ASL9 8.5174210.000000000.0000000000.00000000.0000000000.047996362.302923811 4.7896391.376861700.0000000000.00000000AT1G16530ASL9
AP3 5.6373100.000000000.0000000000.00000000.0364771980.000000000.737317351 4.7056320.157883760.0000000000.00000000AT3G54340AP3
..........................................
GIF32.148823560.0000000000.0000000000.0000000000.0208656000.028529850.0235898151.949227560.0618861180.0000000000.064724627AT4G00850GIF3
PIF42.054708760.0000000000.0000000000.0000000000.0153902040.000000000.0000000001.860517230.1577792890.0000000000.021022038AT2G43010PIF4
AT3G104702.930871030.0000000000.3609626720.0000000000.0000000000.000000000.0000000001.851661940.0000000000.7182464190.000000000AT3G10470AT3G10470
AT1G217802.829928810.0209643230.0184349300.0000000000.0298897940.000000000.0187482251.775793730.0270475910.5229264500.416123760AT1G21780AT1G21780
HB341.961905450.0465913600.0059945260.0000000000.0130192200.000000000.0536118811.725743680.0996704530.0172743210.000000000AT3G28920HB34
AT3G225601.676858340.0000000000.0744104800.0000000000.0000000000.000000000.0000000001.602447860.0000000000.0000000000.000000000AT3G22560AT3G22560
NAC0502.680728570.0000000000.0000000000.0000000000.0176292500.000000000.0000000001.586959130.1308389580.1790134180.766287814AT3G10480NAC050
AT2G222002.678110890.0000000000.0000000000.0000000000.0000000000.000000000.0000000001.552441430.0000000000.0000000001.125669465AT2G22200AT2G22200
AT4G009402.858353760.0000000000.0000000000.0000000000.5962306630.577405680.0602147651.528020160.0964824930.0000000000.000000000AT4G00940AT4G00940
BZIP241.800811180.0000000000.1178644510.0000000000.0000000000.000000000.0943176951.518226760.0704022690.0000000000.000000000AT3G51960BZIP24
AT1G240401.526927850.0042816540.0000000000.0000000000.0030063100.029307740.0246361311.461923380.0000000000.0037726360.000000000AT1G24040AT1G24040
SPL71.998260080.0280516560.1489134310.0000000000.1487734690.098744220.1553158461.352974690.0496557480.0000000000.015831015AT5G18830SPL7
FBH32.607314700.0510971390.0678338480.0100548950.2302648340.412090240.2703689471.338565070.1572356380.0121403910.057663692AT1G51140FBH3
MMD11.352694030.0000000000.0000000000.0000000000.0000000000.072717170.0000000001.279976860.0000000000.0000000000.000000000AT1G66170MMD1
MYB251.419628710.1236081440.0000000000.0755438800.0418808080.028518020.0000000001.075646990.0181337750.0000000000.056297098AT2G39880MYB25
ARR91.569812480.0000000000.1258494610.0349163990.1639300170.003564800.0482649891.003696920.0000000000.1042394100.085350489AT3G57040ARR9
AT5G651301.142362930.0062158900.1058343980.0000000000.0000000000.000000000.0326969000.651484200.2353010140.0000000000.110830527AT5G65130AT5G65130
AT1G246100.859984860.0360557930.0175887290.0000000000.0963228820.034049910.0024852240.578013600.0317444900.0055331990.058191037AT1G24610AT1G24610
AT3G107601.042789630.0000000000.0000000000.2300684930.1573741120.030896670.0137389370.545513770.0337557580.0314418900.000000000AT3G10760AT3G10760
AT1G265900.841958350.0164556160.0000000000.0000000000.0000000000.000000000.1379252110.526927860.1606496560.0000000000.000000000AT1G26590AT1G26590
AT5G067700.690824270.0324873670.0513532730.0420401940.0782980790.000000000.0245929100.454980120.0000000000.0000000000.007072337AT5G06770AT5G06770
AT5G601420.522693400.0000000000.0000000000.0000000000.0000000000.000000000.0689497230.453743680.0000000000.0000000000.000000000AT5G60142AT5G60142
AGL640.392449260.0190263100.1016112040.0000000000.0000000000.005098190.0000000000.266713560.0000000000.0000000000.000000000AT1G29962AGL64
AT4G082500.200194020.0000000000.0090905010.0000000000.0211990720.000000000.0000000000.166131820.0000000000.0037726360.000000000AT4G08250AT4G08250
MYB970.191237640.0292811270.0000000000.0000000000.0000000000.000000000.0000000000.161956510.0000000000.0000000000.000000000AT4G26930MYB97
AT1G768800.149110380.0000000000.0208821290.0325908170.0000000000.000000000.0000000000.095637430.0000000000.0000000000.000000000AT1G76880AT1G76880
SDG200.120982230.0000000000.0000000000.0000000000.0168565920.000000000.0062346700.077468890.0054911180.0149309550.000000000AT3G03750SDG20
BBX320.089766900.0000000000.0204872800.0000000000.0000000000.000000000.0000000000.069279620.0000000000.0000000000.000000000AT3G21150BBX32
OFP110.135399500.0128804040.0000000000.0000000000.0052017420.000000000.0000000000.068465990.0081068960.0407444670.000000000AT4G14860OFP11
WRKY500.044215660.0000000000.0000000000.0069930830.0021954320.000000000.0050136690.030013470.0000000000.0000000000.000000000AT5G26170WRKY50
In [241]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(xyl_rank[1:10,], aes(x=reorder(GeneName, xyl, decreasing = FALSE),  y=xyl)) + geom_point(size=4)+ 
  labs(title="Xylem-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [242]:
write.csv(xyl_rank,"Xylem_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [243]:
tf_rank <- xyl_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [244]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [245]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Xylem ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image

LRC¶

In [246]:
lrc_rank <- bc_rank[which(bc_rank$lrc*2 > bc_rank$all),]%>% arrange(desc(lrc))
lrc_rank$GeneName <- rownames(lrc_rank)
In [247]:
lrc_rank
A data.frame: 29 x 13
allatritricorendperproxylphllrccolGeneIDGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><chr>
ARF1612.09507161.188728040.226250310.336456430.0275541610.0000000000.000000000.0000000000.000000007.54458702.771495746AT4G30080ARF16
MIF3 8.23454500.000000000.000000000.000000000.3622269800.0000000000.000000000.0000000000.000000004.54480803.327510060AT1G18835MIF3
OFP6 5.73705421.287487060.000000000.000000000.0000000000.0000000000.000000000.0000000000.000000004.40922820.040338972AT3G52525OFP6
AT1G68920 7.90786420.085949220.000000000.098901130.1594153590.0000000000.029368650.0000000000.068456124.32731973.138453997AT1G68920AT1G68920
ARF6 7.03562580.340230620.000000000.831798720.0255681390.1024538270.030168450.0120076590.000000003.70843971.984958693AT1G30330ARF6
AT1G74840 6.31899420.394495320.333772130.641922490.1822370840.2588744420.019708900.3360339110.035058293.69911530.417776294AT1G74840AT1G74840
PS1 6.76356421.625088530.000000000.242652191.3514633990.0430074140.000000000.0610903390.000000003.44026230.000000000AT1G34355PS1
AT1G05805 4.68334000.347420200.038668280.013196990.0000000000.0000000000.000000000.0051680630.000000003.16131701.117569481AT1G05805AT1G05805
MYB3R-4 3.49261310.095404100.024175530.092360180.1065126720.0394493350.034021990.2022881970.062034702.69819160.138174819AT5G11510MYB3R-4
HMGB4 5.28930670.355989890.271428850.000000000.0405618470.4782490910.363031720.6004679990.343781162.66691850.168877560AT2G17560HMGB4
AT1G77200 4.93050361.205952840.277067810.389095680.0645911980.0000000000.000000000.0000000000.000000002.53281680.460979324AT1G77200AT1G77200
HMGB3 4.06321960.167883860.072724010.000000000.0972752190.2682611400.302558120.0592368430.461566692.24996240.383751354AT1G20696HMGB3
WRKY42 2.59676140.121528060.266286130.064802320.0000000000.0000000000.000000000.0000000000.000000001.73172160.412423348AT4G04450WRKY42
NGA3 2.83443490.000000000.000000000.094800660.6587611130.0000000000.000000000.0000000000.000000001.55117490.529698233AT1G01030NGA3
AT1G69030 3.00688510.205930150.059653520.195534010.0528976880.0035367860.191610730.3632977870.079585711.51882140.336017317AT1G69030AT1G69030
SDG37 2.14346650.155211090.000000000.095474870.1218360470.0677269360.105766220.0708051700.044024881.48262130.000000000AT2G17900SDG37
CHR24 2.46706410.121125850.000000000.261813180.0396622060.2717540320.319318300.0681253640.100013671.28525150.000000000AT5G63950CHR24
GRF2 2.13683960.234297870.110654190.124608680.0193978260.0611234890.020886680.2064500020.073306151.18232580.103788929AT4G37740GRF2
AT4G17780 2.10444330.201705400.000000000.028405830.0000000000.0000000000.253501540.0000000000.397780331.16354640.059503768AT4G17780AT4G17780
HDG1 2.26888050.148633640.776508040.100468040.0000000000.0000000000.000000000.0342329930.000000001.14548090.063556879AT3G61150HDG1
PYE 1.71861630.086367860.000000000.000000000.0529530000.0378786900.065697310.0916838690.181371280.95161890.251045311AT3G47640PYE
HDG2 0.96565960.000000000.000000000.000000000.0000000000.0000000000.000000000.0000000000.000000000.92377370.041885833AT1G05230HDG2
DAR7 1.39868010.324603080.039063130.000000000.0000000000.0000000000.000000000.0000000000.000000000.83875560.196258323AT5G66610DAR7
CIB5 1.35186360.072060120.169480920.097372070.0495206650.0000000000.000000000.0000000000.000000000.78817530.175254587AT1G26260CIB5
AT2G29065 1.06968800.066990830.107037300.012352980.0098129240.0000000000.000000000.0000000000.000000000.58635050.287143468AT2G29065AT2G29065
AGL17 0.88758740.183709430.156991460.041857390.0309985290.0000000000.000000000.0000000000.000000000.45605520.017975340AT2G22630AGL17
FRS1 0.74715070.034689160.090574330.000000000.0030063100.0000000000.000000000.0000000000.000000000.41736140.201519516AT4G19990FRS1
NAC063 0.59514310.000000000.052371340.000000000.0570867630.0073200870.000000000.0936440200.000000000.36804600.016674827AT3G55210NAC063
SPL13A 0.43772650.000000000.000000000.000000000.0000000000.0000000000.032584550.0350466230.105200330.25782270.007072337AT5G50570SPL13A
In [248]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(lrc_rank[1:10,], aes(x=reorder(GeneName, lrc, decreasing = FALSE),  y=lrc)) + geom_point(size=4)+ 
  labs(title="LRC-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [249]:
write.csv(lrc_rank,"LRC_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [250]:
tf_rank <- lrc_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [251]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [252]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Lateral Root Cap ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image

Columella¶

In [253]:
col_rank <- bc_rank[which(bc_rank$col*2 > bc_rank$all),]%>% arrange(desc(col))
col_rank$GeneName <- rownames(col_rank)
In [254]:
col_rank
A data.frame: 64 x 13
allatritricorendperproxylphllrccolGeneIDGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><chr>
IAA2013.5883080.107454530.0000000000.6960167251.8561043650.0318705330.000000000.089227630.000000000.7761717310.031463AT2G46990IAA20
NAC04217.8985710.011323910.0000000000.0364949810.0000000000.0000000000.000000001.334518750.000000007.48901508 9.027218AT2G43000NAC042
NTT10.2952280.048337740.0000000000.2542297350.2890571200.0000000000.030254901.839258380.066241950.07987596 7.687972AT3G57670NTT
RAP2.114.4932800.157663620.0000000001.5860036470.0769318230.1109229120.000000004.341370640.000000000.95389876 7.266489AT1G46768RAP2.1
AT3G52440 8.2708720.000000000.0000000000.0665269830.0000000000.0000000000.000000000.000000000.000000001.01592556 7.188419AT3G52440AT3G52440
AT3G6067010.8582680.111059650.0000000001.2526882131.2730030341.3583610900.000000000.059300350.000000000.51137037 6.292485AT3G60670AT3G60670
WRKY33 9.8211720.586354330.3639859280.5988346280.3213018410.0059039820.189066550.152530960.134326841.63949253 5.829374AT2G38470WRKY33
FBH4 8.1699020.069587980.0504316990.1395363170.0180721340.0000000000.000000000.000000000.000000002.15983352 5.732440AT2G42280FBH4
LBD4111.0831930.224209170.0783419980.0487958150.0720105630.0129215250.623297640.850630600.266625653.35964330 5.546717AT3G02550LBD41
NAC01010.1335450.000000000.0000000000.0000000000.0000000000.0000000000.000000003.570570930.117058320.91760880 5.528307AT1G28470NAC010
AT3G25790 6.8038920.306720510.0063011031.1054267160.0000000000.0000000000.000000000.000000000.000000000.49668295 4.888761AT3G25790AT3G25790
ASL1 9.0309900.262231950.0581305920.0797239680.0000000000.0000000000.000000000.000000000.000000003.87316468 4.757739AT5G66870ASL1
MAF5 7.4784580.028318850.0000000000.0000000000.0000000000.6684686761.156030090.075235990.400837670.39249355 4.757073AT5G65080MAF5
AT2G35910 7.2232610.840207100.0623931080.0415318930.0000000000.0000000000.000000000.000000000.000000001.74032865 4.538800AT2G35910AT2G35910
SNI1 7.4216681.317461600.0000000000.1187728680.0725201260.0416712320.080063151.270651750.174188770.23258789 4.113750AT4G18470SNI1
CHR38 5.8880800.142252610.0000000000.1962899570.1115383800.1172682630.352606010.000000000.024646530.93446428 4.009014AT3G42670CHR38
AT3G57800 7.2715860.158006480.0000000000.0319893230.0000000000.1797601580.265393580.280040210.381469582.06269730 3.912229AT3G57800AT3G57800
PIF3 5.4045440.197831500.0000000000.2271736980.0561111500.0332833050.014783580.000000000.168051951.01379530 3.693513AT1G09530PIF3
RING1 4.0896270.112299200.0000000000.0751232080.0656827520.0893692080.000000000.000000000.000000000.07140771 3.675745AT5G10380RING1
MYB55 6.9458220.000000000.0000000000.0232884920.1477284240.7505142510.558810500.000000001.168140320.70461530 3.592724AT4G01680MYB55
BPC7 4.1655040.000000000.0000000000.0000000000.0040438050.0000000000.048656360.356641800.143280920.05968475 3.553197AT2G35550BPC7
HSF A4A 4.9628230.128389480.0547806100.0836798950.2678865360.0047063770.018770690.015901730.062367220.78320502 3.543136AT4G18880HSF A4A
NAC016 5.8298370.045163960.0000000000.3630943070.0000000000.0000000000.000000000.000000000.000000002.01853347 3.403045AT1G34180NAC016
TGA7 5.1285380.000000000.4660283150.6936732580.0000000000.0000000000.000000000.000000000.000000000.91988490 3.048951AT1G77920TGA7
NAC052 4.4120810.000000000.0000000000.0196169040.0422852840.0206857240.145174630.137460040.083787060.99213130 2.970940AT3G10490NAC052
NAM 3.4475480.015405820.0000000000.0799462750.0118454450.0667289670.061871270.000000000.000000000.24733734 2.964413AT1G52880NAM
HSL1 5.6218550.020806440.0000000000.0000000000.0095563850.0206788660.016773932.202762000.144002340.25660860 2.950667AT4G32010HSL1
AT2G45120 4.0769050.000000000.0000000000.0000000000.1181443800.0000000000.000000000.924020900.000000000.09853600 2.936204AT2G45120AT2G45120
TRFL3 4.5434290.194133170.0056998560.5250961630.1108504300.0623500980.000000000.000000000.011115420.71114789 2.923036AT1G17460TRFL3
AT2G41835 3.5479950.077940410.0000000000.0099316740.0159276590.0082431630.000000000.000000000.011466960.67095734 2.753528AT2G41835AT2G41835
..........................................
WRKY143.89267630.490244580.2432093590.0000000000.0000000000.0000000000.0000000000.000000000.0000000000.746262722.4129597AT1G30650WRKY14
CCA14.02513820.022234630.0000000000.0129259570.3025684740.2255241810.5624089320.034070270.1921275030.281735812.3915425AT2G46830CCA1
AT5G254703.47253490.126120360.0000000000.3221285450.1439335360.0035032930.0000000000.557862130.0000000000.126061662.1929253AT5G25470AT5G25470
TLP93.96109620.158822160.0464683410.2016335260.1699584040.3970563040.1454468780.000000000.4872620990.325397582.0290509AT3G06380TLP9
AT5G626103.79980410.192365570.2455211180.2903005060.1391581600.0176926890.0000000000.079819430.0580012280.817557401.9593880AT5G62610AT5G62610
BZIP253.44060870.386980960.1392683910.0194936820.1028831470.0000000000.0149545640.185186280.0895990150.560520891.9417217AT3G54620BZIP25
TRB23.12790380.172059190.2527543140.1048662300.0890887300.0264029810.1821394060.184957530.1093440950.274192891.7320985AT5G67580TRB2
RR13.01024310.471288500.2084804080.3177742990.1024602370.0000000000.1108965680.023209300.0539902180.186711051.5354326AT3G16857RR1
AT3G191841.88773230.000000000.1328703650.0000000000.0000000000.0588468050.0277264530.043073170.0330172240.177937551.4142608AT3G19184AT3G19184
TGA42.46351720.034918010.0000000000.2396955910.0680299290.2244672760.1227729090.000000000.2309440680.248057801.2946316AT5G10030TGA4
AT3G085051.85646750.000000000.0115016960.0000000000.0040438050.0059319960.0958629250.140424900.0782954140.317575211.2028315AT3G08505AT3G08505
AT2G201102.00557780.000000000.0000000000.0000000000.0085401250.0129160470.0236330360.027675820.0425729360.836952621.0532872AT2G20110AT2G20110
E2F11.77694130.102291200.0406204910.0173188180.0254330360.0094127530.1572547300.100217620.1273160040.201749890.9953268AT5G22220E2F1
AT5G234051.22747830.036882160.1028229440.0873857250.0784706110.0274101840.0134742350.000000000.0000000000.073445280.8075871AT5G23405AT5G23405
NTM11.12324010.000000000.0000000000.1162658880.0561207870.0117799490.0869107830.000000000.0530813780.015830550.7832508AT4G01540NTM1
SMZ0.71137810.000000000.0078785080.0197401250.0000000000.0000000000.0027895730.015088100.0618215040.016276480.5877838AT3G54990SMZ
AT5G257900.84125110.000000000.0000000000.0075103660.0040438050.0168620720.0372630350.000000000.0492278900.213393550.5129504AT5G25790AT5G25790
AT3G544600.80413790.025412660.0000000000.0073871440.0276400640.0176839300.0352621150.064897370.0000000000.129859240.4959954AT3G54460AT3G54460
DRIP20.90852410.028318850.0551184980.0000000000.0083825590.0352848090.0913872070.048216190.0176005670.169103360.4551120AT2G30580DRIP2
AT4G130400.72878930.022111170.0381451880.0884182130.0129213490.0000000000.0000000000.000000000.0000000000.177591780.3896016AT4G13040AT4G13040
HSFC10.35437150.000000000.0000000000.0000000000.0000000000.0000000000.0037494460.000000000.0000000000.000000000.3506221AT3G24520HSFC1
TRFL10.53483900.000000000.0301506970.0125994250.0223713260.0094127530.0291156510.041207500.0257074640.025860740.3384135AT3G46590TRFL1
AT4G360500.40753250.000000000.0512292800.0000000000.0118284530.0000000000.0000000000.000000000.0000000000.053655570.2908192AT4G36050AT4G36050
AGL800.41496000.000000000.0000000000.0000000000.0040438050.0082431630.0544303510.000000000.0781125190.000000000.2701301AT5G48670AGL80
AT2G335500.28875550.000000000.0000000000.0000000000.0040438050.0147016810.0000000000.000000000.0000000000.082158660.1878513AT2G33550AT2G33550
MYB950.33987610.000000000.0000000000.0000000000.0043908640.0000000000.0455570320.075202080.0270942380.000000000.1876319AT1G74430MYB95
SDG290.31170520.000000000.0000000000.0430367090.0190106050.0000000000.0049704470.009653810.0048771710.056056340.1741001AT5G53430SDG29
FRS60.18033800.000000000.0000000000.0000000000.0103172080.0059039820.0074124500.000000000.0000000000.029365810.1273385AT1G52520FRS6
BAM70.22744050.000000000.0264061110.0069930830.0173908050.0070455580.0000000000.011624790.0186549740.013078470.1262467AT2G45880BAM7
AT1G059200.14961880.029839900.0000000000.0000000000.0021954320.0000000000.0000000000.000000000.0000000000.000000000.1175835AT1G05920AT1G05920
In [255]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(col_rank[1:10,], aes(x=reorder(GeneName, col, decreasing = FALSE),  y=col)) + geom_point(size=4)+ 
  labs(title="Columella-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [256]:
write.csv(col_rank,"Columella_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [257]:
tf_rank <- col_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [258]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [259]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Columella ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image

Add tissue level¶

In [260]:
bc_rank <- bc_rank %>% mutate(ground=cor+end, epi=atri+tri, stele=per+pro+xyl+phl, epilrc=atri+tri+lrc, rc=lrc+col)
In [261]:
head(bc_rank)
A data.frame: 6 x 17
allatritricorendperproxylphllrccolGeneIDgroundepisteleepilrcrc
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><dbl><dbl><dbl><dbl><dbl>
BZIP929.194440.0000000.0000000.0000000.01983748 9.05092129 8.86776250.0568708211.19905212 0.000000.00000000AT5G248000.01983748 0.0000029.174607 0.00000 0.00000000
AT3G4343034.919870.0000000.0000000.0000000.0168412812.12719380 9.50790474.47480476 8.79312886 0.000000.00000000AT3G434300.01684128 0.0000034.903032 0.00000 0.00000000
GATA232.602746.8767345.8442581.9380352.47836267 0.03634172 0.12344380.02555554 0.0273759411.826593.42603973AT2G450504.4163973912.72099 0.21271724.5475815.25262898
LEP34.899384.7381385.6082890.0000005.4851744411.78585516 4.19851510.14260467 2.92113981 0.000000.01966089AT5G139105.4851744410.3464319.04811510.34643 0.01966089
MYB2030.032400.0000000.0000000.0000000.3196843110.6308911010.98124674.08713837 4.01344128 0.000000.00000000AT1G662300.31968431 0.0000029.712717 0.00000 0.00000000
OBP220.546270.0000000.0000000.0000000.00000000 5.48240701 5.44166620.00000000 9.62219734 0.000000.00000000AT1G076400.00000000 0.0000020.546271 0.00000 0.00000000

Ground Tissue¶

In [262]:
ground_rank <- bc_rank[which(bc_rank$ground*2 > bc_rank$all),]%>% arrange(desc(ground))
ground_rank <- ground_rank[-c(match(rownames(cor_rank), rownames(ground_rank)),match(rownames(end_rank), rownames(ground_rank))),]
ground_rank$GeneName <- rownames(ground_rank)
In [263]:
ground_rank
A data.frame: 26 x 18
allatritricorendperproxylphllrccolGeneIDgroundepisteleepilrcrcGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><dbl><dbl><dbl><dbl><dbl><chr>
MYB1220.586637160.9566508140.1520888117.6326938384.321086252.0917676070.8232330274.212783730.1539468880.1799715810.062414612AT2G4746011.953780085 1.1087396257.28173125 1.2887112060.24238619MYB12
HAT721.686502176.5693204504.1531706496.4971928284.440356010.0000000000.0264622300.000000000.0000000000.0000000000.000000000AT5G1515010.93754884110.7224910990.0264622310.7224910990.00000000HAT7
SOM15.204364421.4706220610.0000000002.9741189026.312540153.1262918921.0036009640.000000000.1095499760.0062430320.201397440AT1G03790 9.286659050 1.4706220614.23944283 1.4768650930.20764047SOM
ARR3 8.840903651.5699817240.0452550813.0003987551.877914250.7115213400.4153935600.000000000.0342705360.0316241131.154544284AT1G59940 4.878313010 1.6152368061.16118544 1.6468609191.18616840ARR3
AN3 8.513300581.6082481190.0000000001.8109696252.998981541.2521086250.5268941280.000000000.1912315440.1248670010.000000000AT5G28640 4.809951163 1.6082481191.97023430 1.7331151200.12486700AN3
AT3G56230 9.433356591.2423158340.0447896432.1774595182.620160380.0000000000.0000000001.305414920.0000000001.8290699830.214146309AT3G56230 4.797619896 1.2871054771.30541492 3.1161754602.04321629AT3G56230
ULT1 7.638482391.5741762640.0000000002.9154652741.213644071.4648694150.0063373220.117518760.0000000000.1729976680.173473621AT4G28190 4.129109344 1.5741762641.58872550 1.7471739320.34647129ULT1
HSFB4 7.513028582.4850152660.0000000001.5872713962.251368500.5653865270.4948448140.000000000.1291420770.0000000000.000000000AT1G46264 3.838639896 2.4850152661.18937342 2.4850152660.00000000HSFB4
AT5G57150 5.225816080.2801048800.0000000000.9523418532.057793480.9366027080.2953509910.000000000.5620033030.0836513000.057967564AT5G57150 3.010135337 0.2801048801.79395700 0.3637561800.14161886AT5G57150
AT3G24120 4.027602040.9874609540.0000000001.7474136140.887089850.2900564500.0637002490.000000000.0184100450.0298132720.003657608AT3G24120 2.634503459 0.9874609540.37216674 1.0172742260.03347088AT3G24120
HB5 4.464682200.0344996290.0000000001.8378958870.754922650.9941815990.2727563210.000000000.5704261210.0000000000.000000000AT5G65310 2.592818534 0.0344996291.83736404 0.0344996290.00000000HB5
AT5G43530 4.119805281.3202431600.1805989801.4911029870.975377000.1524831590.0000000000.000000000.0000000000.0000000000.000000000AT5G43530 2.466479985 1.5008421400.15248316 1.5008421400.00000000AT5G43530
AT3G23690 4.200561980.4221575680.0215728721.1162938871.144933620.5272952610.3672472390.072045230.5290163100.0000000000.000000000AT3G23690 2.261227507 0.4437304391.49560403 0.4437304390.00000000AT3G23690
AT1G16640 2.826023470.8534227730.2812673141.3251909980.279056420.0213332600.0000000000.000000000.0000000000.0565435480.009209155AT1G16640 1.604247420 1.1346900870.02133326 1.1912336350.06575270AT1G16640
AT4G36860 2.259288810.0168149450.0000000000.5081310130.701826660.0416336200.0024852240.463605850.2000766220.0382032100.286511664AT4G36860 1.209957673 0.0168149450.70780132 0.0550181550.32471487AT4G36860
COL4 1.740823580.0872304190.0342712840.8427391190.331660020.1320017510.0302978680.000000000.0000000000.1587158010.123907319AT5G24930 1.174399136 0.1215017030.16229962 0.2802175040.28262312COL4
ZFN1 2.196857030.0000000000.0000000000.8725890480.268136720.3051043900.0604335110.000000000.1519197390.2833329480.255340666AT3G02830 1.140725772 0.0000000000.51745764 0.2833329480.53867361ZFN1
ERF15 1.042686700.0000000000.0000000000.4532980350.428387810.0000000000.0000000000.161000850.0000000000.0000000000.000000000AT2G31230 0.881685848 0.0000000000.16100085 0.0000000000.00000000ERF15
AT3G20800 0.680905800.0286243680.0000000000.0574708480.312538280.0329001690.0150436610.030963790.0693479660.0639895740.070027151AT3G20800 0.370009128 0.0286243680.14825558 0.0926139420.13401672AT3G20800
AT1G60700 0.693833520.0158870700.1636427820.1922549350.162031050.0334106430.0000000000.062467830.0000000000.0369025500.027236652AT1G60700 0.354285986 0.1795298520.09587848 0.2164324020.06413920AT1G60700
AT1G62120 0.578928590.0252767410.0467639360.1093285800.216006430.0970853200.0000000000.061328750.0000000000.0231388330.000000000AT1G62120 0.325335008 0.0720406770.15841407 0.0951795100.02313883AT1G62120
ZFN3 0.474825830.0126655670.1152537870.2193197680.087639710.0000000000.0000000000.000000000.0399469930.0000000000.000000000AT5G16540 0.306959480 0.1279193550.03994699 0.1279193550.00000000ZFN3
NSI 0.452091410.0098034810.1197914470.1450217530.117707030.0070505510.0440915300.000000000.0086256190.0000000000.000000000AT1G32070 0.262728781 0.1295949280.05976770 0.1295949280.00000000NSI
NBS1 0.328810850.0598114800.0088930770.0884698380.083981440.0283124540.0000000000.017604670.0000000000.0230590290.018678852AT3G02680 0.172451281 0.0687045570.04591713 0.0917635860.04173788NBS1
AGL67 0.264593510.1034543820.0000000000.1320464300.029092700.0000000000.0000000000.000000000.0000000000.0000000000.000000000AT1G77950 0.161139127 0.1034543820.00000000 0.1034543820.00000000AGL67
AT5G08520 0.015700860.0000000000.0059945260.0046675020.005038830.0000000000.0000000000.000000000.0000000000.0000000000.000000000AT5G08520 0.009706332 0.0059945260.00000000 0.0059945260.00000000AT5G08520
In [264]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(ground_rank[1:10,], aes(x=reorder(GeneName, ground, decreasing = FALSE),  y=ground)) + geom_point(size=4)+ 
  labs(title="Ground Tissue-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [265]:
write.csv(ground_rank,"Ground_Tissue_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [266]:
tf_rank <- ground_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [267]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [268]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Ground Tissue ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image

Epidermis¶

In [269]:
epi_rank <- bc_rank[which(bc_rank$epi*2 > bc_rank$all),]%>% arrange(desc(epi))
epi_rank <- epi_rank[-c(match(rownames(atri_rank), rownames(epi_rank)),match(rownames(tri_rank), rownames(epi_rank))),]
epi_rank$GeneName <- rownames(epi_rank)
In [270]:
epi_rank
A data.frame: 54 x 18
allatritricorendperproxylphllrccolGeneIDgroundepisteleepilrcrcGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><dbl><dbl><dbl><dbl><dbl><chr>
WRKY7517.31371415.484428456.379976231.0945873550.0050125390.0000000000.0000000000.015477340.0000000000.000000004.334232198AT5G130801.0995998911.86440470.01547734111.86440474.33423220WRKY75
KDR13.24798814.771985356.475360381.7676638060.2329785780.0000000000.0000000000.000000000.0000000000.000000000.000000000AT1G269452.0006423811.24734570.00000000011.24734570.00000000KDR
ATS15.57264393.981763924.463011441.2605927791.7681284280.0000000000.0000000000.000000000.0000000003.771632920.327514456AT5G426303.02872121 8.44477540.00000000012.21640834.09914738ATS
IAA1412.64690564.348045593.188176952.1761200620.0000000000.7085714990.1528087370.074367410.0074289251.968156120.023230326AT4G145502.17612006 7.53622250.943176568 9.50437871.99138645IAA14
ARR5 9.07890204.490527842.271293740.3852901120.0891702050.0050981900.2216005540.240921410.1389037200.788271530.447824687AT3G481000.47446032 6.76182160.606523871 7.55009311.23609622ARR5
TGA1011.18206395.475816441.188399432.8268263901.6754997840.0000000000.0000000000.000000000.0000000000.012040130.003481673AT5G068394.50232617 6.66421590.000000000 6.67625600.01552181TGA10
AT2G37120 8.70086603.057382353.080944330.7563585860.2494928020.4902496030.1931946490.723325230.1380369750.011881470.000000000AT2G371201.00585139 6.13832671.544806460 6.15020820.01188147AT2G37120
WRKY7211.49856721.500702594.632475320.0000000000.0000000000.0000000000.0000000000.000000000.0000000003.495314851.870074408AT5G151300.00000000 6.13317790.000000000 9.62849285.36538926WRKY72
ATHB1310.95072132.030696233.754380111.7085499902.0103709471.0054273850.2677479510.000000000.0523543960.000000000.121194254AT1G697803.71892094 5.78507631.325529732 5.78507630.12119425ATHB13
EGL3 8.55577911.792143863.802373771.5904484571.3708130440.0000000000.0000000000.000000000.0000000000.000000000.000000000AT1G636502.96126150 5.59451760.000000000 5.59451760.00000000EGL3
WRI1 8.30708632.408177863.174431631.4572085860.1839733140.0156080690.0000000000.000000000.0000000000.965286760.102400073AT3G543201.64118190 5.58260950.015608069 6.54789621.06768683WRI1
OFP15 8.66191343.697263811.578037790.8836923531.1269565400.0000000000.0000000000.000000000.0000000001.261114760.114848112AT2G360502.01064889 5.27530160.000000000 6.53641641.37596287OFP15
NFL 8.78451362.230407392.679398900.9819561732.0010872340.0000000000.0000000000.000000000.0000000000.553781070.337882823AT5G656402.98304341 4.90980630.000000000 5.46358740.89166389NFL
CRF4 5.81590442.824336551.790177780.4068603450.4407879450.0343785380.0000000000.039591600.0000000000.177245360.102526300AT4G279500.84764829 4.61451430.073970134 4.79175970.27977166CRF4
HDG7 6.65136902.248268521.291194191.9079119160.8898343120.0642584950.0000000000.015576280.0000000000.234325270.000000000AT5G521702.79774623 3.53946270.079834772 3.77378800.23432527HDG7
AT5G61590 6.64469143.015604560.358930410.4075352750.2416710532.2537458460.1462800390.044871570.1760526850.000000000.000000000AT5G615900.64920633 3.37453502.620950142 3.37453500.00000000AT5G61590
NAC044 4.36427391.753885501.332135100.3400295220.8727652090.0089149840.0000000000.000000000.0000000000.056543550.000000000AT3G016001.21279473 3.08602060.008914984 3.14256420.05654355NAC044
AT4G26810 5.73926701.318950841.726252040.7470092741.0967919090.6564353800.0857734450.047618150.0245813610.000000000.035854578AT4G268101.84380118 3.04520290.814408332 3.04520290.03585458AT4G26810
WRKY27 5.28163601.736826261.307101730.0823675830.0000000000.0000000000.0000000000.000000000.0000000002.040551440.114788991AT5G528300.08236758 3.04392800.000000000 5.08447942.15534043WRKY27
AT1G76110 2.90006991.150810421.067029200.2643916800.2548288220.0865657500.0000000000.017533830.0000000000.032525360.026384881AT1G761100.51922050 2.21783960.104099578 2.25036500.05891025AT1G76110
ORC1B 3.35616071.179287530.912472900.5499225570.1254301780.3475155800.0477919330.147195990.0000000000.011861900.034682139AT4G126200.67535274 2.09176040.542503499 2.10362230.04654403ORC1B
HMGB2 3.95526331.282416160.734365730.9444993020.0666316800.3198755280.2242357840.029666020.2226963900.130876670.000000000AT1G206931.01113098 2.01678190.796473724 2.14765860.13087667HMGB2
AT2G36026 2.80778420.693173941.302223480.1044917700.0592926120.0000000000.0000000000.000000000.0000000000.517522010.131080424AT2G360260.16378438 1.99539740.000000000 2.51291940.64860243AT2G36026
AT5G23930 3.84099931.087344770.889304451.3215920420.1318278980.0141471440.0000000000.000000000.0000000000.396782960.000000000AT5G239301.45341994 1.97664920.014147144 2.37343220.39678296AT5G23930
HRS1 3.48122341.459540380.479709910.3009068421.1641782650.0418007250.0350873220.000000000.0000000000.000000000.000000000AT1G133001.46508511 1.93925030.076888047 1.93925030.00000000HRS1
ERF104 2.84397800.908202450.840047460.0771930670.1006511600.4466636510.1489898890.020631980.0000000000.165408460.136189831AT5G616000.17784423 1.74824990.616285520 1.91365840.30159829ERF104
HB16 3.18132170.791766000.918517721.0491275310.2118263480.0476685330.0655689230.000000000.0233139110.059388060.014144674AT4G400601.26095388 1.71028370.136551367 1.76967180.07353273HB16
NAC053 2.74585451.168287310.388213190.1524645610.0399994730.0000000000.0336146090.207933860.0000000000.315834290.439507238AT3G105000.19246403 1.55650050.241548465 1.87233480.75534153NAC053
NF-YB11 2.79423001.352236190.201903000.3653708900.1025004990.0660465200.0918246180.178892930.0261636390.240421410.168870323AT2G274700.46787139 1.55413920.362927711 1.79456060.40929173NF-YB11
AT3G09735 2.95164950.462142591.059985720.0046675020.2243419250.2597806510.2048375700.497942830.2379506820.000000000.000000000AT3G097350.22900943 1.52212831.200511728 1.52212830.00000000AT3G09735
KAN 2.70763421.142885490.372477580.0615338110.0321998360.0311486180.0000000000.000000000.0000000000.834351080.233037755AT5G165600.09373365 1.51536310.031148618 2.34971411.06738883KAN
AT1G21150 2.63390020.289897471.202718500.7477179480.1115222640.0863009360.0000000000.112027340.0147618500.068953890.000000000AT1G211500.85924021 1.49261600.213090124 1.56156990.06895389AT1G21150
AT5G11340 2.26237090.531218720.842376110.0427503480.0515223990.2187667320.2473489890.097626060.2151467920.000000000.015614790AT5G113400.09427275 1.37359480.778888574 1.37359480.01561479AT5G11340
AT1G61990 1.84540660.836590820.339347700.3943980570.1245681800.1025249320.0000000000.000000000.0000000000.047976950.000000000AT1G619900.51896624 1.17593850.102524932 1.22391550.04797695AT1G61990
MBD6 1.32566670.649579500.392209770.0776704090.0687495000.0238737680.0000000000.068625400.0027588780.023390340.018809123AT5G593800.14641991 1.04178930.095258045 1.06517960.04219947MBD6
HFR1 1.68327000.611280580.411703580.5906241630.0696617230.0000000000.0000000000.000000000.0000000000.000000000.000000000AT1G023400.66028589 1.02298420.000000000 1.02298420.00000000HFR1
NF-YC10 1.31635250.486277280.358418200.1210831050.1932167850.0228067490.0000000000.014188680.0344024620.027524790.058434472AT1G079800.31429989 0.84469550.071397892 0.87222030.08595926NF-YC10
PTAC15 1.34478890.550058850.127946130.2520396550.1136538610.0969952070.0536700270.009653810.0578092090.082962120.000000000AT5G541800.36569352 0.67800500.218128253 0.76096710.08296212PTAC15
AT3G46950 0.92066070.188337900.434664100.0900543100.0890602020.0141191300.0150410060.000000000.0000000000.032696180.056687911AT3G469500.17911451 0.62300200.029160136 0.65569820.08938409AT3G46950
AT5G28300 0.94162320.226069340.340028290.3185175460.0115446870.0000000000.0000000000.000000000.0454633650.000000000.000000000AT5G283000.33006223 0.56609760.045463365 0.56609760.00000000AT5G28300
ATMAK3 0.83177920.295607980.215998250.0000000000.0534772240.0342297510.0637463550.057507400.0155448540.090390360.005277005AT2G381300.05347722 0.51160620.171028364 0.60199660.09566737ATMAK3
NPR4 0.80172850.087358660.313954210.0093186650.0203728210.0035648000.0934132380.000000000.0000000000.095515910.178230237AT4G196600.02969149 0.40131290.096978038 0.49682880.27374615NPR4
KAPP 0.65192130.071807320.301906020.0000000000.0289926400.0000000000.0000000000.098710440.0169552910.071758720.061790883AT5G192800.02899264 0.37371330.115665726 0.44547210.13354960KAPP
AT5G64950 0.53402960.096814750.251272370.0000000000.1401813190.0094127530.0000000000.036348430.0000000000.000000000.000000000AT5G649500.14018132 0.34808710.045761184 0.34808710.00000000AT5G64950
AT3G24490 0.63601010.109998680.234459330.0129259570.0501824580.0267001310.0402528500.078816780.0648167600.017857140.000000000AT3G244900.06310841 0.34445800.210586520 0.36231510.01785714AT3G24490
BEH4 0.51590490.238381330.089523040.0210119270.0167523230.0000000000.0000000000.000000000.0000000000.097336260.052900032AT1G787000.03776425 0.32790440.000000000 0.42524060.15023630BEH4
ETR1 0.63357900.232819570.094520310.0760954320.0624789230.0000000000.0137936610.010336130.0618258590.053289570.028419578AT1G663400.13857436 0.32733990.085955645 0.38062950.08170915ETR1
AT3G53440 0.57688350.124939910.177259740.0148975100.0196851530.0143266740.0074556710.000000000.0048771710.100456680.112985009AT3G534400.03458266 0.30219970.026659516 0.40265630.21344169AT3G53440
AT3G24820 0.51834940.060325660.233714460.0116769240.1042707280.0140576230.0100873220.023852590.0111197360.000000000.049244346AT3G248200.11594765 0.29404010.059117274 0.29404010.04924435AT3G24820
AT2G23060 0.50526370.215496780.078458290.0000000000.0000000000.0000000000.0000000000.105378280.0000000000.000000000.105930335AT2G230600.00000000 0.29395510.105378281 0.29395510.10593034AT2G23060
SDG40 0.41112010.183127400.110013430.0129259570.0154262770.0000000000.0000000000.037563200.0095588390.042505030.000000000AT5G172400.02835223 0.29314080.047122037 0.33564590.04250503SDG40
IPT2 0.45583220.056637700.178064630.0460539350.0124051290.0047343910.0225128870.041666720.0779810330.015775790.000000000AT2G277600.05845906 0.23470230.146895027 0.25047810.01577579IPT2
AT2G46040 0.38349890.122831730.100512700.0000000000.0285530570.0255360190.0000000000.039667280.0056019800.060796100.000000000AT2G460400.02855306 0.22334440.070805281 0.28414050.06079610AT2G46040
FRF1 0.19913050.084747250.049466270.0124762030.0216198020.0070455580.0108753960.012900020.0000000000.000000000.000000000AT3G594700.03409600 0.13421350.030820975 0.13421350.00000000FRF1
In [271]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(epi_rank[1:10,], aes(x=reorder(GeneName, epi, decreasing = FALSE),  y=epi)) + geom_point(size=4)+ 
  labs(title="Epidermis-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [272]:
write.csv(epi_rank,"Epidermis_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [273]:
tf_rank <- epi_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [274]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [275]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Epidermis ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image

Epidermis + LRC¶

In [276]:
epilrc_rank <- bc_rank[which(bc_rank$epilrc*2 > bc_rank$all),]%>% arrange(desc(epilrc))
epilrc_rank <- epilrc_rank[-c(match(rownames(atri_rank), rownames(epilrc_rank)),match(rownames(tri_rank), rownames(epilrc_rank)),match(rownames(lrc_rank), rownames(epilrc_rank))),]
epilrc_rank$GeneName <- rownames(epilrc_rank)
In [277]:
epilrc_rank
A data.frame: 153 x 18
allatritricorendperproxylphllrccolGeneIDgroundepisteleepilrcrcGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><dbl><dbl><dbl><dbl><dbl><chr>
GATA232.602746.87673385.84425791.93803472.4783626730.036341720.123443770.025555540.02737594511.8265893.42603973AT2G450504.416397412.72099170.2127169724.54758115.252629GATA2
BT224.625123.63243231.11023220.29313510.0298718550.000000000.000000000.028363940.00000000011.3348158.19626518AT3G483600.3230069 4.74266450.0283639416.07747919.531080BT2
WER21.568194.25193222.60994491.51139672.4012691100.115130150.000000000.000000000.000000000 8.5169072.16161412AT5G147503.9126658 6.86187710.1151301515.37878410.678521WER
NAI123.015903.59541460.94266600.29111090.0998468790.000000000.000000000.034807240.000000000 9.1149678.93708230AT2G227700.3909578 4.53808060.0348072413.65304818.052049NAI1
CRF321.977122.35888402.33674160.50177251.7406716221.005704680.105478010.000000000.120318333 8.7136605.09389294AT5G532902.2424441 4.69562561.2315010213.40928613.807553CRF3
WRKY1718.324513.32876032.86387311.59996190.9117677020.091813570.101008141.365082040.174774268 7.1926770.69479190AT2G245702.5117296 6.19263341.7326780213.385311 7.887469WRKY17
CRF224.489262.86114391.73489952.31873511.9916968261.618581520.098805701.164858391.533178032 8.3449042.82245557AT4G237504.3104319 4.59604344.4154236412.94094711.167360CRF2
ATS15.572643.98176394.46301141.26059281.7681284280.000000000.000000000.000000000.000000000 3.7716330.32751446AT5G426303.0287212 8.44477540.0000000012.216408 4.099147ATS
AT1G3606023.062584.42372481.20398151.65039470.1735987510.000000000.000000000.066774390.000000000 6.4783969.06570848AT1G360601.8239934 5.62770630.0667743912.10610215.544104AT1G36060
WRKY913.852943.62955563.04326710.00000000.0000000000.000000000.000000000.000000000.000000000 5.2274081.95271264AT1G681500.0000000 6.67282270.0000000011.900231 7.180121WRKY9
WRKY7517.313715.48442856.37997621.09458740.0050125390.000000000.000000000.015477340.000000000 0.0000004.33423220AT5G130801.099599911.86440470.0154773411.864405 4.334232WRKY75
BRON19.433913.19499960.12943551.36769381.5611072900.039504120.000000000.000000000.000000000 8.3249524.81622044AT1G757102.9288011 3.32443520.0395041211.64938713.141172BRON
SMB20.512962.60418560.00000001.68861520.2140204060.000000000.000000000.000000000.000000000 8.7612127.24493062AT1G795801.9026356 2.60418560.0000000011.36539816.006143SMB
KDR13.247994.77198536.47536041.76766380.2329785780.000000000.000000000.000000000.000000000 0.0000000.00000000AT1G269452.000642411.24734570.0000000011.247346 0.000000KDR
IAA113.990143.44843781.03729840.35891420.0000000000.000000000.000000000.171730080.000000000 6.5121812.46158019AT4G145600.3589142 4.48573620.1717300810.997917 8.973761IAA1
ATCTH20.181723.19440952.56682730.13325510.8463913330.044574920.664048433.434859480.262589493 5.1998893.83487626AT2G259000.9796464 5.76123684.4060723310.961126 9.034765ATCTH
GATA417.274593.24258884.91078183.26138213.0677151090.080914100.063578510.135414460.000000000 2.5122180.00000000AT3G605306.3290973 8.15337060.2799070710.665589 2.512218GATA4
TMO717.421194.37414653.06421202.85613331.6223015630.000000000.000000000.000000000.023581642 3.2193092.26150501AT1G745004.4784349 7.43835850.0235816410.657667 5.480814TMO7
GATA17L19.005343.49034752.48561951.85405871.5659431122.835203520.073692290.175070390.025902967 4.2003712.29913248AT4G161413.4200018 5.97596703.1098691610.176338 6.499503GATA17L
AT1G2219015.637423.89960980.12121210.77372650.1388858640.000000000.051920270.287872180.060517590 5.7412784.56240213AT1G221900.9126123 4.02082200.40031004 9.76210010.303680AT1G22190
WRKY7211.498571.50070264.63247530.00000000.0000000000.000000000.000000000.000000000.000000000 3.4953151.87007441AT5G151300.0000000 6.13317790.00000000 9.628493 5.365389WRKY72
IAA1412.646914.34804563.18817702.17612010.0000000000.708571500.152808740.074367410.007428925 1.9681560.02323033AT4G145502.1761201 7.53622250.94317657 9.504379 1.991386IAA14
EEL15.393121.81503910.00000001.99649730.2562965260.184404730.068758810.151744920.000000000 7.1333943.78698434AT2G410702.2527938 1.81503910.40490846 8.94843410.920379EEL
RITF117.305923.47909081.86503262.37495761.8536430890.826227370.000000000.124197720.000000000 3.5271533.25561831AT2G126464.2286006 5.34412340.95042510 8.871276 6.782771RITF1
3xHMG-box213.796922.55582440.00000001.40796831.7594335041.175528800.028385580.157406500.150451205 6.2125880.34933662AT4G238003.1674018 2.55582441.51177208 8.768413 6.5619253xHMG-box2
GATA1716.676352.83697002.97898871.88429031.9374576341.665799300.105759111.072091650.000000000 2.9327461.26225145AT3G168703.8217479 5.81595872.84365006 8.748704 4.194997GATA17
AT2G3560514.519612.22433513.43482891.96260061.8277651580.996130680.088301080.399967490.031971410 2.5501861.00352555AT2G356053.7903658 5.65916401.51637066 8.209350 3.553712AT2G35605
WRKY1112.764371.92192011.79063800.14961531.0666416320.095699280.131876751.433318130.100382145 4.2681161.80616522AT4G315501.2162570 3.71255801.76127631 7.980674 6.074281WRKY11
AIL615.270310.41155980.00000000.29413650.1789425310.078612560.000000000.052087430.000000000 7.4177256.83724606AT5G105100.4730790 0.41155980.13069999 7.82928514.254971AIL6
AT2G4616011.645072.58116002.26926771.59895021.2356625010.027426740.100972950.258374710.057222697 2.8325560.68347271AT2G461602.8346127 4.85042770.44399709 7.682983 3.516028AT2G46160
.........................................................
NPR40.80172850.0873586630.313954210.0093186650.0203728210.0035648000.0934132380.0000000000.0000000000.095515910.178230237AT4G196600.029691490.401312870.096978040.496828780.27374615NPR4
NPR10.71561800.1468881950.210826860.0848777190.0303526530.0000000000.0124261190.0000000000.0000000000.135538590.094707862AT1G642800.115230370.357715060.012426120.493253650.23024646NPR1
E2F30.83596570.1902134920.000000000.0893975880.0609799610.0732626880.0372351350.0000000000.0095482570.255518710.119809907AT2G360100.150377550.190213490.120046080.445732200.37532862E2F3
KAPP0.65192130.0718073170.301906020.0000000000.0289926400.0000000000.0000000000.0987104350.0169552910.071758720.061790883AT5G192800.028992640.373713340.115665730.445472050.13354960KAPP
TIFY80.84440500.1041869260.000000000.0000000000.1837822370.1603224800.0000000000.0000000000.0469939320.332725340.016394100AT4G325700.183782240.104186930.207316410.436912260.34911944TIFY8
BEH40.51590490.2383813270.089523040.0210119270.0167523230.0000000000.0000000000.0000000000.0000000000.097336260.052900032AT1G787000.037764250.327904370.000000000.425240630.15023630BEH4
AT4G144900.68345230.2513168200.051860010.0536010260.0712769530.0207062590.0000000000.1164819580.0000000000.118209260.000000000AT4G144900.124877980.303176830.137188220.421386090.11820926AT4G14490
AT3G534400.57688350.1249399130.177259740.0148975100.0196851530.0143266740.0074556710.0000000000.0048771710.100456680.112985009AT3G534400.034582660.302199650.026659520.402656330.21344169AT3G53440
ETR10.63357900.2328195740.094520310.0760954320.0624789230.0000000000.0137936610.0103361250.0618258590.053289570.028419578AT1G663400.138574360.327339880.085955650.380629460.08170915ETR1
AT3G244900.63601010.1099986780.234459330.0129259570.0501824580.0267001310.0402528500.0788167780.0648167600.017857140.000000000AT3G244900.063108410.344458000.210586520.362315150.01785714AT3G24490
TAF6B0.54416240.0140258280.243122790.0000000000.0128520150.0263724550.0000000000.0000000000.0555649610.102535920.089688456AT1G543600.012852020.257148620.081937420.359684540.19222437TAF6B
BEH10.58195300.1738613150.071530260.1296869630.0040013350.0000000000.0000000000.0000000000.0000000000.103406230.099466891AT3G507500.133688300.245391570.000000000.348797800.20287312BEH1
AT5G649500.53402960.0968147530.251272370.0000000000.1401813190.0094127530.0000000000.0363484300.0000000000.000000000.000000000AT5G649500.140181320.348087120.045761180.348087120.00000000AT5G64950
AT5G078100.67377210.2119047830.074595880.2574251470.0631812560.0000000000.0000000000.0000000000.0000000000.061243800.005421276AT5G078100.320606400.286500660.000000000.347744470.06666508AT5G07810
SDG400.41112010.1831274010.110013430.0129259570.0154262770.0000000000.0000000000.0375631980.0095588390.042505030.000000000AT5G172400.028352230.293140830.047122040.335645870.04250503SDG40
ASIL20.66493790.1104215420.119893580.0363227120.0326947330.0070735720.0111618960.0403397530.0264795060.104160100.176390549AT3G141800.069017450.230315120.085054730.334475220.28055065ASIL2
AT3G248200.51834940.0603256600.233714460.0116769240.1042707280.0140576230.0100873220.0238525930.0111197360.000000000.049244346AT3G248200.115947650.294040120.059117270.294040120.04924435AT3G24820
AT2G230600.50526370.2154967790.078458290.0000000000.0000000000.0000000000.0000000000.1053782810.0000000000.000000000.105930335AT2G230600.000000000.293955070.105378280.293955070.10593034AT2G23060
AT2G460400.38349890.1228317290.100512700.0000000000.0285530570.0255360190.0000000000.0396672820.0056019800.060796100.000000000AT2G460400.028553060.223344430.070805280.284140530.06079610AT2G46040
AT5G415800.41846830.0429524530.056138830.0300320020.0221147860.0117519350.0000000000.0000000000.0260727890.153177630.076227836AT5G415800.052146790.099091280.037824720.252268910.22940547AT5G41580
IPT20.45583220.0566376990.178064630.0460539350.0124051290.0047343910.0225128870.0416667170.0779810330.015775790.000000000AT2G277600.058459060.234702330.146895030.250478120.01577579IPT2
AT1G744100.45585040.0571748660.130642730.0077916570.0264492970.0023671950.0432968810.0572334190.0048771710.061496500.064520712AT1G744100.034240950.187817600.107774670.249314100.12601722AT1G74410
AT1G772500.39121260.0468725440.027074080.0116932630.0266608780.0023671950.0756342170.0109749840.0063942820.151384190.032156955AT1G772500.038354140.073946620.095370680.225330810.18354114AT1G77250
PCFS40.41040910.0577455710.000000000.0000000000.0413294770.0165423540.0648358930.0214278980.0475611900.160966710.000000000AT4G048850.041329480.057745570.150367340.218712280.16096671PCFS4
TAFII210.37889480.0630866350.000000000.0000000000.0246495930.0176444050.0125990040.0116113620.0691977130.152506010.027600122AT1G541400.024649590.063086630.111052480.215592650.18010613TAFII21
MYB10.23980950.0964008270.000000000.0000000000.0115079760.0082151490.0238498830.0206545100.0000000000.064104150.015077036AT3G092300.011507980.096400830.052719540.160504980.07918119MYB1
RR140.18770250.0213250980.070815640.0000000000.0000000000.0054116900.0123396760.0337448150.0000000000.044065580.000000000AT2G017600.000000000.092140740.051496180.136206320.04406558RR14
FRF10.19913050.0847472460.049466270.0124762030.0216198020.0070455580.0108753960.0129000210.0000000000.000000000.000000000AT3G594700.034096000.134213520.030820980.134213520.00000000FRF1
AT3G044500.15115820.0042816540.024905140.0000000000.0000000000.0000000000.0000000000.0000000000.0000000000.065283480.056687911AT3G044500.000000000.029186790.000000000.094470270.12197139AT3G04450
AT5G477900.15674190.0216897780.043873110.0000000000.0388859190.0070735720.0062936610.0064567230.0000000000.028420520.004048649AT5G477900.038885920.065562890.019823960.093983410.03246917AT5G47790
In [278]:
options(repr.plot.width=8, repr.plot.height=40)
ggplot(epilrc_rank, aes(x=reorder(GeneName, epilrc, decreasing = FALSE),  y=epilrc)) + geom_point(size=4)+ 
  labs(title="Epidermis+LRC-specific TF Prioritization",x="", y = "Combined centrality score (betweeness, out and in degree)")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [279]:
write.csv(epilrc_rank,"Epidermis_LRC_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [280]:
tf_rank <- epilrc_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [281]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [282]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Epidermis (includes LRC)", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image

Stele¶

In [283]:
stele_rank <- bc_rank[which(bc_rank$stele*2 > bc_rank$all),]%>% arrange(desc(stele))
stele_rank <- stele_rank[-c(match(rownames(per_rank), rownames(stele_rank)),match(rownames(pro_rank), rownames(stele_rank)),match(rownames(xyl_rank), rownames(stele_rank)),match(rownames(phl_rank), rownames(stele_rank))),]
stele_rank$GeneName <- rownames(stele_rank)
In [284]:
stele_rank
A data.frame: 458 x 18
allatritricorendperproxylphllrccolGeneIDgroundepisteleepilrcrcGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><dbl><dbl><dbl><dbl><dbl><chr>
AT3G4343034.919870.000000000.0000000000.000000000.01684128312.12719380 9.5079054.47480476 8.79312890.0000000000.00000000AT3G43430 0.016841283 0.0000000034.90303 0.0000000000.00000000AT3G43430
MYB2030.032400.000000000.0000000000.000000000.31968431510.6308911010.9812474.08713837 4.01344130.0000000000.00000000AT1G66230 0.319684315 0.0000000029.71272 0.0000000000.00000000MYB20
BZIP929.194440.000000000.0000000000.000000000.019837480 9.05092129 8.8677630.0568708211.19905210.0000000000.00000000AT5G24800 0.019837480 0.0000000029.17461 0.0000000000.00000000BZIP9
AT1G2916026.545550.019026310.0000000000.000000000.000000000 6.79408747 7.7624290.01525082 7.84630153.0567532231.05170007AT1G29160 0.000000000 0.0190263122.41807 3.0757795334.10845329AT1G29160
AT3G6049021.856740.000000000.0000000000.000000000.000000000 8.08244563 5.5540850.14141893 8.02921910.0000000000.04957311AT3G60490 0.000000000 0.0000000021.80717 0.0000000000.04957311AT3G60490
AT2G3414032.723090.047248030.0000000000.255213551.135486766 8.75993314 6.8777220.42124328 5.38968283.3795745896.45698638AT2G34140 1.390700317 0.0472480321.44858 3.4268226169.83656097AT2G34140
MYB4321.355560.000000000.0000000000.011823910.003006310 8.23756692 9.8104980.19019593 3.10246480.0000000000.00000000AT5G16600 0.014830225 0.0000000021.34073 0.0000000000.00000000MYB43
HAT232.688930.235996060.0000000003.084908298.045560446 8.80783792 4.0772043.65164416 4.72287370.0000000000.06290083AT5G4737011.130468731 0.2359960621.25956 0.2359960650.06290083HAT2
BT121.061980.000000000.0000000000.185539980.275729783 5.21780895 6.9076996.05818042 2.41702620.0000000000.00000000AT5G63160 0.461269760 0.0000000020.60071 0.0000000000.00000000BT1
OBP220.546270.000000000.0000000000.000000000.000000000 5.48240701 5.4416660.00000000 9.62219730.0000000000.00000000AT1G07640 0.000000000 0.0000000020.54627 0.0000000000.00000000OBP2
AT5G0579020.410740.000000000.0000000000.000000000.14552806310.14826356 2.7821220.19008703 7.14473560.0000000000.00000000AT5G05790 0.145528063 0.0000000020.26521 0.0000000000.00000000AT5G05790
HB-820.708210.000000000.0000000000.000000000.071413411 0.28929886 7.6550467.46358740 4.25929370.0000000000.96956766AT4G32880 0.071413411 0.0000000019.66723 0.0000000000.96956766HB-8
DAG119.124210.000000000.0000000000.000000000.006218002 7.03655820 5.9675431.45403275 4.65985940.0000000000.00000000AT3G61850 0.006218002 0.0000000019.11799 0.0000000000.00000000DAG1
LEP34.899384.738137735.6082889560.000000005.48517443611.78585516 4.1985150.14260467 2.92113980.0000000000.01966089AT5G13910 5.48517443610.3464266919.0481110.3464266870.01966089LEP
AT5G5178022.405880.374548990.2271582390.452935942.411834952 6.86298227 6.3049182.55997040 3.21152620.0000000000.00000000AT5G51780 2.864770897 0.6017072318.93940 0.6017072290.00000000AT5G51780
TMO620.086710.000000000.0000000000.000000001.485898656 5.76737678 5.4261851.34690659 6.06034380.0000000000.00000000AT5G60200 1.485898656 0.0000000018.60081 0.0000000000.00000000TMO6
GBF620.370230.000000000.0000000000.000000001.452010760 1.53958777 6.2226751.95853546 8.81742770.0171435860.36284715AT4G34590 1.452010760 0.0000000018.53823 0.0171435860.37999074GBF6
MIF124.165850.071285220.0000000000.186717253.999123918 8.88658200 5.1626020.00000000 4.43073800.1252147711.30358794AT1G74660 4.185841166 0.0712852218.47992 0.1964999941.42880271MIF1
ATAUX2-1121.075830.193405440.0000000000.448258621.543580233 2.89993813 5.3556027.94507347 1.81312990.5216899370.35514871AT5G43700 1.991838853 0.1934054418.01374 0.7150953730.87683865ATAUX2-11
AT2G4113018.615750.000000000.0000000000.000000001.383295295 7.92902790 4.5887043.87678089 0.83794610.0000000000.00000000AT2G41130 1.383295295 0.0000000017.23246 0.0000000000.00000000AT2G41130
AT3G1128016.048170.000000000.0000000000.000000000.009554638 6.08858168 3.5423930.25573934 6.15190480.0000000000.00000000AT3G11280 0.009554638 0.0000000016.03862 0.0000000000.00000000AT3G11280
HB-719.407490.039796060.0583102070.603651942.545569057 5.05704243 5.9215521.07773851 3.90713190.0989966560.09770080AT2G46680 3.149221002 0.0981062715.96346 0.1971029210.19669745HB-7
OBP315.915790.000000000.0000000000.000000000.000000000 5.08201268 6.1413620.00000000 4.69241400.0000000000.00000000AT3G55370 0.000000000 0.0000000015.91579 0.0000000000.00000000OBP3
IAA1316.102340.036461350.0093970790.097265090.241823206 2.99051483 5.1755642.38858390 5.16272730.0000000000.00000000AT2G33310 0.339088299 0.0458584315.71739 0.0458584260.00000000IAA13
AT1G6958015.621390.000000000.0000000000.000000000.085626577 2.02178383 3.7491562.86734166 6.89748390.0000000000.00000000AT1G69580 0.085626577 0.0000000015.53577 0.0000000000.00000000AT1G69580
ATHB-1515.034170.000000000.0000000000.000000000.000000000 0.03150225 6.3804967.07116671 1.55100580.0000000000.00000000AT1G52150 0.000000000 0.0000000015.03417 0.0000000000.00000000ATHB-15
IAA1115.031230.000000000.0841068630.050028030.108662695 2.93012090 2.7600593.95039434 4.87783540.0149309550.25509492AT4G28640 0.158690728 0.0841068614.51841 0.0990378180.27002587IAA11
UNE1215.027640.000000000.0000000000.000000000.539538894 4.61197071 3.2765223.89687891 2.67200780.0062430320.02448246AT4G02590 0.539538894 0.0000000014.45738 0.0062430320.03072549UNE12
NF-YB217.890900.155681550.3378761160.311234121.129316445 3.01883199 3.1271186.53336700 1.65634710.4254894401.19564026AT5G47640 1.440550561 0.4935576614.33566 0.9190471031.62112970NF-YB2
bZIP4414.490520.135654730.0000000000.025614070.238377502 6.43444893 1.6065230.03520935 5.88982470.0000000000.12486973AT1G75390 0.263991575 0.1356547313.96601 0.1356547310.12486973bZIP44
.........................................................
AT5G407100.320747140.0775527080.0000000000.0000000000.0263438820.0254366190.1309156900.0322913550.0282068830.0000000000.000000000AT5G407100.0263438820.0775527080.216850550.0775527080.000000000AT5G40710
AT1G768700.216454760.0000000000.0000000000.0000000000.0000000000.0235151960.0884328350.0869713300.0175353990.0000000000.000000000AT1G768700.0000000000.0000000000.216454760.0000000000.000000000AT1G76870
FRS40.281792400.0000000000.0239781040.0000000000.0246210560.0301979460.0941737890.0038794030.0876616970.0037726360.013507772AT1G763200.0246210560.0239781040.215912830.0277507400.017280407FRS4
AT2G047400.381861000.0000000000.0972559310.0126549290.0172162980.1028055600.0000000000.0000000000.1062060410.0098676640.035854578AT2G047400.0298712270.0972559310.209011600.1071235940.045722242AT2G04740
TAF120.291987970.0182344880.0000000000.0000000000.0171792230.0467897250.0357115840.1219162470.0032297250.0055331990.043393778AT3G100700.0171792230.0182344880.207647280.0237676870.048926977TAF12
TRFL50.288432760.0000000000.0233858300.0000000000.0030063100.0372045320.0273374610.0696050680.0669131330.0500076000.010972823AT1G157200.0030063100.0233858300.201060190.0733934300.060980423TRFL5
U2AF35B0.375765460.0750975910.0678157180.0000000000.0125030010.0823280710.0057880740.0364094500.0762100390.0196135130.000000000AT5G428200.0125030010.1429133090.200735630.1625268220.019613513U2AF35B
SWI20.305557270.0000000000.0000000000.0073871440.0339978780.0225524600.0737682050.0141886810.0834599170.0132953400.056907648AT1G037500.0413850220.0000000000.193969260.0132953400.070202988SWI2
SDG250.261501890.0000000000.0120490620.0000000000.0246422910.0000000000.0542144430.0064567230.1297873520.0000000000.034352018AT5G424000.0246422910.0120490620.190458520.0120490620.034352018SDG25
AT2G246500.336738520.0000000000.0000000000.0147742890.0144930500.0193745650.0725622650.0118449340.0823905700.0487161820.072582665AT2G246500.0292673390.0000000000.186172330.0487161820.121298846AT2G24650
MAF30.331636310.0062158900.0000000000.0198633470.0606396260.0263134160.1067848930.0496754710.0000000000.0091415830.053002081AT5G650600.0805029730.0062158900.182773780.0153574730.062143664MAF3
AT5G469150.175565570.0000000000.0000000000.0000000000.0020112850.0858858650.0074556710.0802127490.0000000000.0000000000.000000000AT5G469150.0020112850.0000000000.173554290.0000000000.000000000AT5G46915
TRB30.300479030.0067265580.0587347400.0000000000.0287275640.0105823440.0875628710.0133704870.0593433050.0000000000.035431160AT3G498500.0287275640.0654612980.170859010.0654612980.035431160TRB3
TGA60.218735770.0000000000.0000000000.0000000000.0300247400.0177399590.0674727830.0428306140.0297391310.0000000000.030928548AT3G122500.0300247400.0000000000.157782490.0000000000.030928548TGA6
LDL30.295449580.0118299530.0000000000.0124762030.0192063480.0140911160.1138296060.0227299810.0056019800.0210369950.074647400AT4G163100.0316825500.0118299530.156252680.0328669480.095684395LDL3
AT2G246900.259796310.0303915220.0146048400.0352537440.0249171570.0211581700.1082398380.0038794030.0213516360.0000000000.000000000AT2G246900.0601709010.0449963620.154629050.0449963620.000000000AT2G24690
HAC40.241277600.0000000000.0907487570.0000000000.0020112850.0661668920.0000000000.0823506710.0000000000.0000000000.000000000AT1G559700.0020112850.0907487570.148517560.0907487570.000000000HAC4
AT1G198600.249233290.0766888910.0000000000.0000000000.0213794420.0535990160.0630651020.0219729000.0069947380.0055331990.000000000AT1G198600.0213794420.0766888910.145631760.0822220910.005533199AT1G19860
AT3G080200.249251310.0000000000.0348286430.0124762030.0293577350.0117519350.0607090230.0000000000.0729682320.0000000000.027159540AT3G080200.0418339380.0348286430.145429190.0348286430.027159540AT3G08020
AT4G084550.285517170.0000000000.0266792300.0000000000.0399930830.0222727720.0495091870.0258666000.0465377560.0000000000.074658545AT4G084550.0399930830.0266792300.144186310.0266792300.074658545AT4G08455
AT1G557500.192245250.0000000000.0177861530.0000000000.0246466570.0371253960.0266429500.0191582380.0595920910.0072937630.000000000AT1G557500.0246466570.0177861530.142518670.0250799160.007293763AT1G55750
AT2G171500.184605900.0000000000.0000000000.0100548950.0197833640.0023671950.0862554560.0000000000.0510890870.0150559030.000000000AT2G171500.0298382600.0000000000.139711740.0150559030.015055903AT2G17150
MYB640.210134650.0288219230.0481950240.0000000000.0000000000.0000000000.0000000000.0735307120.0595869910.0000000000.000000000AT5G110500.0000000000.0770169480.133117700.0770169480.000000000MYB64
EMB930.156155410.0000000000.0000000000.0000000000.0175759960.0453495430.0108753960.0655482730.0063942820.0104119170.000000000AT2G030500.0175759960.0000000000.128167490.0104119170.010411917EMB93
SDIR10.217109800.0000000000.0000000000.0000000000.0990510040.0136516770.0000000000.0862704180.0181367010.0000000000.000000000AT3G555300.0990510040.0000000000.118058800.0000000000.000000000SDIR1
TCP90.163319010.0000000000.0090905010.0000000000.0412224980.0543575690.0363166820.0059224670.0164092970.0000000000.000000000AT2G456800.0412224980.0090905010.113006010.0090905010.000000000TCP9
AT4G196500.102316150.0000000000.0090905010.0000000000.0050388300.0181616050.0490453500.0076254120.0048120030.0000000000.008542453AT4G196500.0050388300.0090905010.079644370.0090905010.008542453AT4G19650
AT4G114000.107563370.0000000000.0383197050.0000000000.0000000000.0253568590.0000000000.0438868030.0000000000.0000000000.000000000AT4G114000.0000000000.0383197050.069243660.0383197050.000000000AT4G11400
AT3G511800.087597310.0154058150.0000000000.0000000000.0219615140.0035367860.0275103460.0000000000.0191828460.0000000000.000000000AT3G511800.0219615140.0154058150.050229980.0154058150.000000000AT3G51180
NF-YA60.060688340.0000000000.0000000000.0000000000.0235827980.0117239210.0000000000.0000000000.0253816240.0000000000.000000000AT3G140200.0235827980.0000000000.037105540.0000000000.000000000NF-YA6
In [285]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(stele_rank[1:10,], aes(x=reorder(GeneName, stele, decreasing = FALSE),  y=stele)) + geom_point(size=4)+ 
  labs(title="Stele-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [286]:
write.csv(stele_rank,"Stele_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [287]:
tf_rank <- stele_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [288]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [289]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Stele", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image

Root Cap¶

In [290]:
rc_rank <- bc_rank[which(bc_rank$rc*2 > bc_rank$all),]%>% arrange(desc(rc))
rc_rank <- rc_rank[-c(match(rownames(lrc_rank), rownames(rc_rank)),match(rownames(col_rank), rownames(rc_rank))),]
rc_rank$GeneName <- rownames(rc_rank)
In [291]:
rc_rank
A data.frame: 121 x 18
allatritricorendperproxylphllrccolGeneIDgroundepisteleepilrcrcGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><dbl><dbl><dbl><dbl><dbl><chr>
BT224.625123.632432311.110232170.293135090.029871860.000000000.000000000.028363940.00000000011.3348158.196265AT3G483600.323006954.742664480.0283639416.07747919.531080BT2
NAI123.015903.595414580.942666010.291110930.099846880.000000000.000000000.034807240.000000000 9.1149678.937082AT2G227700.390957814.538080590.0348072413.65304818.052049NAI1
LBD1519.768100.076097310.000000000.000000000.000000000.000000000.000000002.405016510.000000000 9.3901807.896803AT2G404700.000000000.076097312.40501651 9.46627817.286983LBD15
SMB20.512962.604185560.000000001.688615190.214020410.000000000.000000000.000000000.000000000 8.7612127.244931AT1G795801.902635602.604185560.0000000011.36539816.006143SMB
AT1G3606023.062584.423724791.203981501.650394670.173598750.000000000.000000000.066774390.000000000 6.4783969.065708AT1G360601.823993425.627706280.0667743912.10610215.544104AT1G36060
AIL615.270310.411559820.000000000.294136500.178942530.078612560.000000000.052087430.000000000 7.4177256.837246AT5G105100.473079030.411559820.13069999 7.82928514.254971AIL6
CRF321.977122.358884012.336741610.501772451.740671621.005704680.105478010.000000000.120318333 8.7136605.093893AT5G532902.242444074.695625621.2315010213.40928613.807553CRF3
BRON19.433913.194999650.129435521.367693781.561107290.039504120.000000000.000000000.000000000 8.3249524.816220AT1G757102.928801073.324435160.0395041211.64938713.141172BRON
PLT122.457573.595032980.000000002.350708512.478321750.151840490.059375240.865180020.000000000 6.5505856.406522AT3G208404.829030263.595032981.0763957510.14561812.957106PLT1
AT1G2668015.492360.054008770.000000000.995042501.536349290.071892080.000000000.000000000.000000000 5.9685986.866465AT1G266802.531391790.054008770.07189208 6.02260712.835063AT1G26680
ZFP523.600822.606602830.091556880.020233010.000000000.000000002.746388344.842690170.944938866 5.4171756.931232AT1G104800.020233012.698159718.53401737 8.11533512.348407ZFP5
AT1G3270019.460240.000000000.000000000.000000000.084882941.370845671.796918761.549558882.941386341 3.4390368.277616AT1G327000.084882940.000000007.65870965 3.43903611.716652AT1G32700
NAC09415.747321.880389540.000000001.565461651.194887060.000000000.000000000.000000000.000000000 5.2916315.814952AT5G398202.760348711.880389540.00000000 7.17202011.106582NAC094
EEL15.393121.815039130.000000001.996497300.256296530.184404730.068758810.151744920.000000000 7.1333943.786984AT2G410702.252793831.815039130.40490846 8.94843410.920379EEL
PLT217.036741.892907220.440543002.232999212.041076940.015921570.000000000.025067360.000000000 4.1218086.266412AT1G511904.274076152.333450210.04098893 6.45525910.388220PLT2
AT1G2219015.637423.899609850.121212120.773726470.138885860.000000000.051920270.287872180.060517590 5.7412784.562402AT1G221900.912612334.020821970.40031004 9.76210010.303680AT1G22190
GATA916.978011.639073160.025118910.727811650.496452670.118567150.040102683.824896680.064742300 4.2163695.824879AT4G328901.224264321.664192074.04830882 5.88056110.041248GATA9
IAA3316.145052.043254740.000000002.328423792.105308480.090349050.000000000.000000000.006524618 4.9992874.571902AT5G574204.433732262.043254740.09687367 7.042542 9.571189IAA33
AT4G3978014.442010.146932882.325883780.255257150.527929380.000000000.031603880.229268701.693975779 3.5703885.660773AT4G397800.783186532.472816671.95484836 6.043205 9.231161AT4G39780
HSFA7A12.763670.251177550.000000000.122911690.145930231.129091710.577579040.025870891.529779244 3.3027995.678535AT3G519100.268841920.251177553.26232088 3.553977 8.981335HSFA7A
IAA113.990143.448437831.037298410.358914220.000000000.000000000.000000000.171730080.000000000 6.5121812.461580AT4G145600.358914224.485736240.1717300810.997917 8.973761IAA1
AIL510.380880.090346070.000000000.161074110.000000000.000000000.309265470.114706640.763348449 4.4232384.518897AT5G573900.161074110.090346071.18732056 4.513585 8.942136AIL5
CZF115.299040.084824870.000000000.019616900.206129892.080464852.362628580.319654261.518278929 2.3626196.344818AT2G401400.225746800.084824876.28102662 2.447444 8.707437CZF1
RAV216.978410.000000000.000000000.038864140.016221271.197654253.283551071.805663971.941675572 3.5597805.134996AT1G688400.055085410.000000008.22854486 3.559780 8.694776RAV2
SPT12.674620.525873890.000000001.196451960.306855570.214193570.278158841.724152110.110248577 4.0648054.253880AT4G369301.503307520.525873892.32675310 4.590679 8.318685SPT
WRKY1510.637510.478173920.020487281.024094570.299640360.000000000.318773590.868394090.077883400 4.3489543.201104AT2G233201.323734940.498661201.26505108 4.847615 7.550058WRKY15
FEZ13.191002.002462390.000000001.686989022.067926870.035032930.000000000.033907540.000000000 3.9603803.404301AT1G268703.754915892.002462390.06894047 5.962842 7.364681FEZ
NAC06013.900341.374577290.000000001.380613000.556277730.058219800.000000003.224943520.000000000 2.9376024.368105AT3G442901.936890741.374577293.28316332 4.312180 7.305707NAC060
GATA713.485701.706556460.000000002.249019551.788338780.132125870.000000000.323146480.000000000 3.4477563.838753AT4G362404.037358331.706556460.45527235 5.154313 7.286509GATA7
AGL2112.997620.305771330.000000001.284886601.952845601.054550840.579024550.172656730.395315424 1.6576275.594945AT4G379403.237732200.305771332.20154754 1.963398 7.252572AGL21
.........................................................
AT2G444301.14333350.0729912270.0000000000.0553616790.103557170.0000000000.0426126520.1313178930.0027588780.288168440.44656555AT2G444300.158918850.0729912270.1766894230.361159670.7347340AT2G44430
ATL91.17331750.2887517220.0909146160.0455550830.013100150.0000000000.0000000000.0094910840.0000000000.455086270.27041862AT2G350000.058655230.3796663380.0094910840.834752610.7255049ATL9
AT4G009901.13727430.0590349570.0000000000.0240564380.077133300.0586882000.0729086150.0351236880.0919325760.294538200.42385828AT4G009900.101189740.0590349570.2586530800.353573160.7183965AT4G00990
AT4G223601.19067070.1323518210.0223267440.0423877730.135542840.0000000000.0523048500.0750088210.0902366640.293589370.34692181AT4G223600.177930610.1546785660.2175503360.448267940.6405112AT4G22360
AT1G775701.22367600.0411638110.0000000000.0064629790.150400660.1077278370.0959053100.0704943840.1296956700.228179050.39364634AT1G775700.156863630.0411638110.4038232010.269342860.6218254AT1G77570
AP21.21919480.0190439560.0000000000.3990887940.132434000.0000000000.0198817900.0119476270.0152911550.356591940.26491557AT4G369200.531522790.0190439560.0471205710.375635890.6215075AP2
HB41.17057730.0415534990.0177861530.5013749010.000000000.0000000000.0000000000.0000000000.0000000000.564946780.04491594AT2G449100.501374900.0593396530.0000000000.624286430.6098627HB4
emb27461.14747620.1823085520.0506653840.1130812770.058852960.1113624750.0000000000.0000000000.0242974350.434204480.17270365AT5G634200.171934240.2329739360.1356599100.667178420.6069081emb2746
SNL60.85500120.0236599070.0000000000.0634310080.005038830.0732573570.0664346470.0206319800.0000000000.232706050.36984142AT1G104500.068469840.0236599070.1603239840.256365960.6025475SNL6
AT1G295601.03156960.0000000000.0000000000.0000000000.000000000.0187704690.1352039560.2024564940.0844454370.107749300.48294394AT1G295600.000000000.0000000000.4408763560.107749300.5906932AT1G29560
HDG120.97301900.2181431830.0933458970.1064594810.000000000.0000000000.0075421140.0059224670.0000000000.217775590.32383023AT1G179200.106459480.3114890800.0134645810.529264670.5416058HDG12
ATX10.88645890.0574113320.0000000000.0000000000.017869610.0000000000.1079658000.0881334010.0888104520.339656620.18661166AT2G316500.017869610.0574113320.2849096540.397067960.5262683ATX1
SDG20.92718380.0755709250.0000000000.0641973520.050939460.0195161340.0958445420.0383808710.0570953500.162089610.36354955AT4G151800.115136810.0755709250.2108368970.237660530.5256392SDG2
BIM20.93617480.1637223450.0121864760.0566970010.030836720.0136401660.1062078300.0000000000.0597726130.375394850.11771680AT1G690100.087533720.1759088210.1796206100.551303680.4931117BIM2
AT1G194900.70992150.0213250980.0000000000.0000000000.003006310.0000000000.0000000000.1964373630.0000000000.267600750.22155199AT1G194900.003006310.0213250980.1964373630.288925850.4891527AT1G19490
AT5G611900.78498130.0000000000.0000000000.0219863200.015167940.0377198450.1042852430.0261963410.0914709990.110236290.37791828AT5G611900.037154260.0000000000.2596724280.110236290.4881546AT5G61190
TTG10.81233020.0556615000.0121338270.0046675020.157924200.0092284840.0000000000.0245113830.0957308080.301429910.15104256AT5G245200.162591700.0677953260.1294706760.369225240.4524725TTG1
AT5G654900.85015310.0593801360.0000000000.1086718580.036554780.0998944160.0720650120.0206319800.0116824640.177266890.26400554AT5G654900.145226640.0593801360.2042738730.236647030.4412724AT5G65490
AT1G504100.68010540.0165920830.0549592210.0325859930.057371010.0105823440.0558008160.0000000000.0565037390.110841980.28486824AT1G504100.089957000.0715513040.1228868990.182393290.3957102AT1G50410
AT4G147200.74853490.0900645650.0000000000.0000000000.020461050.0408760280.0603306140.0798247660.0664413350.077939660.31259686AT4G147200.020461050.0900645650.2474727430.168004230.3905365AT4G14720
AT1G060700.63349940.0507355420.0000000000.0144759540.025448880.0117519350.0804017440.0502724040.0153563230.206285620.17877098AT1G060700.039924830.0507355420.1577824060.257021160.3850566AT1G06070
SUVH60.64987340.0000000000.0088744590.0372304840.040697100.0612347530.1645877630.0077453820.0000000000.052890820.27661259AT2G227400.077927580.0088744590.2335678980.061765280.3295034SUVH6
AT4G290000.54514690.0000000000.0374458870.0196169040.031671170.0240864210.0381671040.0339945810.0393432110.101322380.21949921AT4G290000.051288070.0374458870.1355913160.138768270.3208216AT4G29000
HDG110.53117210.0000000000.0000000000.0000000000.197117220.0000000000.0277671860.0090340420.0000000000.114664750.18258891AT1G733600.197117220.0000000000.0368012290.114664750.2972537HDG11
AT1G804000.43685480.0000000000.0000000000.0416093810.078508880.0058759670.0460364400.0000000000.0266071220.077721350.16049571AT1G804000.120118260.0000000000.0785195290.077721350.2382171AT1G80400
AT5G415800.41846830.0429524530.0561388260.0300320020.022114790.0117519350.0000000000.0000000000.0260727890.153177630.07622784AT5G415800.052146790.0990912790.0378247240.252268910.2294055AT5G41580
SPL110.43674990.0205819050.0000000000.0000000000.011802970.0000000000.0186175670.0000000000.1577928180.045046660.18290793AT1G273600.011802970.0205819050.1764103860.065628560.2279546SPL11
IBM10.37055670.0633984440.0000000000.0188468800.028599870.0153727630.0312806110.0090340420.0054911180.052450950.14608204AT3G076100.047446750.0633984440.0611785350.115849390.1985330IBM1
AT5G583400.27334690.0000000000.0170995670.0000000000.022289290.0000000000.0038373220.0346105460.0369404820.028880530.12968914AT5G583400.022289290.0170995670.0753883500.045980100.1585697AT5G58340
AT3G044500.15115820.0042816540.0249051360.0000000000.000000000.0000000000.0000000000.0000000000.0000000000.065283480.05668791AT3G044500.000000000.0291867900.0000000000.094470270.1219714AT3G04450
In [292]:
rc_rank[1:50,]
A data.frame: 50 x 18
allatritricorendperproxylphllrccolGeneIDgroundepisteleepilrcrcGeneName
<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><chr><dbl><dbl><dbl><dbl><dbl><chr>
BT224.6251153.632432311.110232170.293135090.029871860.0000000000.000000000.028363940.00000000011.3348158.196265AT3G483600.323006954.742664480.0283639416.07747919.531080BT2
NAI123.0158953.595414580.942666010.291110930.099846880.0000000000.000000000.034807240.000000000 9.1149678.937082AT2G227700.390957814.538080590.0348072413.65304818.052049NAI1
LBD1519.7680970.076097310.000000000.000000000.000000000.0000000000.000000002.405016510.000000000 9.3901807.896803AT2G404700.000000000.076097312.40501651 9.46627817.286983LBD15
SMB20.5129642.604185560.000000001.688615190.214020410.0000000000.000000000.000000000.000000000 8.7612127.244931AT1G795801.902635602.604185560.0000000011.36539816.006143SMB
AT1G3606023.0625784.423724791.203981501.650394670.173598750.0000000000.000000000.066774390.000000000 6.4783969.065708AT1G360601.823993425.627706280.0667743912.10610215.544104AT1G36060
AIL615.2703100.411559820.000000000.294136500.178942530.0786125620.000000000.052087430.000000000 7.4177256.837246AT5G105100.473079030.411559820.13069999 7.82928514.254971AIL6
CRF321.9771242.358884012.336741610.501772451.740671621.0057046810.105478010.000000000.120318333 8.7136605.093893AT5G532902.242444074.695625621.2315010213.40928613.807553CRF3
BRON19.4339123.194999650.129435521.367693781.561107290.0395041210.000000000.000000000.000000000 8.3249524.816220AT1G757102.928801073.324435160.0395041211.64938713.141172BRON
PLT122.4575653.595032980.000000002.350708512.478321750.1518404930.059375240.865180020.000000000 6.5505856.406522AT3G208404.829030263.595032981.0763957510.14561812.957106PLT1
AT1G2668015.4923560.054008770.000000000.995042501.536349290.0718920830.000000000.000000000.000000000 5.9685986.866465AT1G266802.531391790.054008770.07189208 6.02260712.835063AT1G26680
ZFP523.6008172.606602830.091556880.020233010.000000000.0000000002.746388344.842690170.944938866 5.4171756.931232AT1G104800.020233012.698159718.53401737 8.11533512.348407ZFP5
AT1G3270019.4602440.000000000.000000000.000000000.084882941.3708456661.796918761.549558882.941386341 3.4390368.277616AT1G327000.084882940.000000007.65870965 3.43903611.716652AT1G32700
NAC09415.7473211.880389540.000000001.565461651.194887060.0000000000.000000000.000000000.000000000 5.2916315.814952AT5G398202.760348711.880389540.00000000 7.17202011.106582NAC094
EEL15.3931201.815039130.000000001.996497300.256296530.1844047260.068758810.151744920.000000000 7.1333943.786984AT2G410702.252793831.815039130.40490846 8.94843410.920379EEL
PLT217.0367361.892907220.440543002.232999212.041076940.0159215700.000000000.025067360.000000000 4.1218086.266412AT1G511904.274076152.333450210.04098893 6.45525910.388220PLT2
AT1G2219015.6374243.899609850.121212120.773726470.138885860.0000000000.051920270.287872180.060517590 5.7412784.562402AT1G221900.912612334.020821970.40031004 9.76210010.303680AT1G22190
GATA916.9780131.639073160.025118910.727811650.496452670.1185671500.040102683.824896680.064742300 4.2163695.824879AT4G328901.224264321.664192074.04830882 5.88056110.041248GATA9
IAA3316.1450502.043254740.000000002.328423792.105308480.0903490510.000000000.000000000.006524618 4.9992874.571902AT5G574204.433732262.043254740.09687367 7.042542 9.571189IAA33
AT4G3978014.4420120.146932882.325883780.255257150.527929380.0000000000.031603880.229268701.693975779 3.5703885.660773AT4G397800.783186532.472816671.95484836 6.043205 9.231161AT4G39780
HSFA7A12.7636750.251177550.000000000.122911690.145930231.1290917100.577579040.025870891.529779244 3.3027995.678535AT3G519100.268841920.251177553.26232088 3.553977 8.981335HSFA7A
IAA113.9901413.448437831.037298410.358914220.000000000.0000000000.000000000.171730080.000000000 6.5121812.461580AT4G145600.358914224.485736240.1717300810.997917 8.973761IAA1
AIL510.3808760.090346070.000000000.161074110.000000000.0000000000.309265470.114706640.763348449 4.4232384.518897AT5G573900.161074110.090346071.18732056 4.513585 8.942136AIL5
CZF115.2990350.084824870.000000000.019616900.206129892.0804648492.362628580.319654261.518278929 2.3626196.344818AT2G401400.225746800.084824876.28102662 2.447444 8.707437CZF1
RAV216.9784060.000000000.000000000.038864140.016221271.1976542473.283551071.805663971.941675572 3.5597805.134996AT1G688400.055085410.000000008.22854486 3.559780 8.694776RAV2
SPT12.6746190.525873890.000000001.196451960.306855570.2141935750.278158841.724152110.110248577 4.0648054.253880AT4G369301.503307520.525873892.32675310 4.590679 8.318685SPT
WRKY1510.6375050.478173920.020487281.024094570.299640360.0000000000.318773590.868394090.077883400 4.3489543.201104AT2G233201.323734940.498661201.26505108 4.847615 7.550058WRKY15
FEZ13.1910002.002462390.000000001.686989022.067926870.0350329330.000000000.033907540.000000000 3.9603803.404301AT1G268703.754915892.002462390.06894047 5.962842 7.364681FEZ
NAC06013.9003391.374577290.000000001.380613000.556277730.0582198030.000000003.224943520.000000000 2.9376024.368105AT3G442901.936890741.374577293.28316332 4.312180 7.305707NAC060
GATA713.4856971.706556460.000000002.249019551.788338780.1321258710.000000000.323146480.000000000 3.4477563.838753AT4G362404.037358331.706556460.45527235 5.154313 7.286509GATA7
AGL2112.9976230.305771330.000000001.284886601.952845601.0545508420.579024550.172656730.395315424 1.6576275.594945AT4G379403.237732200.305771332.20154754 1.963398 7.252572AGL21
WRKY913.8529443.629555593.043267070.000000000.000000000.0000000000.000000000.000000000.000000000 5.2274081.952713AT1G681500.000000006.672822660.0000000011.900231 7.180121WRKY9
GATA512.5724111.322531150.078403081.561351480.314084090.0821723990.065393802.169048930.222794805 2.9046703.851962AT5G663201.875435571.400934232.53940993 4.305604 6.756631GATA5
LBD4 7.8642800.574712490.000000000.260845830.253035880.0436344160.011205120.017279220.048576210 3.6996022.955389AT1G313200.513881710.574712490.12069497 4.274315 6.654991LBD4
ANL210.0459882.469133950.164009861.515865940.234744770.0000000000.000000000.000000000.000000000 3.8238301.838403AT4G007301.750610722.633143820.00000000 6.456974 5.662234ANL2
TLP6 9.1707880.991953440.000000001.764558960.180362970.0650394510.195570720.294485520.042768440 2.5552593.080790AT1G472701.944921930.991953440.59786412 3.547213 5.636049TLP6
WRKY31 9.0792411.805953851.551886660.155912490.000000000.0000000000.000000000.000000000.000000000 1.2039034.361585AT4G220700.155912493.357840510.00000000 4.561743 5.565488WRKY31
AT1G21000 8.5145290.196875750.000000000.058481050.026708980.7525686581.103382340.297146270.564318157 2.4678713.047177AT1G210000.085190020.196875752.71741542 2.664747 5.515048AT1G21000
COL5 6.6283810.450285550.255028930.054559540.070089410.0336518890.187198600.135987040.064790003 2.9363102.440480AT5G576600.124648950.705314490.42162753 3.641625 5.376790COL5
BIM1 9.6896381.544575000.496149880.653115510.128579460.6773781520.422135280.069991080.361471855 2.2846073.051636AT5G081300.781694962.040724881.53097636 4.325332 5.336242BIM1
AT1G49475 7.8637561.343783920.000000000.532722030.374767680.2654634100.020571140.000000000.000000000 1.7190203.607428AT1G494750.907489711.343783920.28603455 3.062804 5.326448AT1G49475
AT5G48560 6.7805650.817156330.032323230.124920850.133436790.1102143860.190745360.000000000.101236657 1.9352643.335268AT5G485600.258357650.849479560.40219641 2.784743 5.270532AT5G48560
AT1G11950 7.4357010.183414380.090748760.526981790.080446220.1496146500.084539820.888197040.168801797 1.9769383.286019AT1G119500.607428010.274163131.29115331 2.251101 5.262957AT1G11950
RGL2 7.1784750.324397840.000000000.769451120.335249940.0969241030.168992000.083966580.180624707 3.5437521.675116AT3G034501.104701050.324397840.53050739 3.868150 5.218868RGL2
AT1G76580 5.0774100.035221440.000000000.014774290.024999840.0086130330.052171830.000000000.000000000 2.4203072.521322AT1G765800.039774130.035221440.06078487 2.455529 4.941629AT1G76580
PPD1 8.3599871.157514080.088771311.612113020.296804430.3252638800.050104270.056632410.027876254 3.1856231.559284AT4G147131.908917451.246285390.45987681 4.431908 4.744907PPD1
AT4G25400 7.0090970.828159530.763123030.019740130.119551830.0850796950.505135480.000000000.142685122 1.7517702.793852AT4G254000.139291951.591282570.73290030 3.343052 4.545622AT4G25400
WRKY26 7.3144700.059831890.000000000.034884080.000000000.1158349720.946804660.313389891.437225703 2.2009182.205581AT5G071000.034884080.059831892.81325523 2.260750 4.406499WRKY26
BBX30 8.2563580.523101220.000000000.590864170.598796350.0098828790.442022401.722421660.067284633 1.8085892.493395AT4G152481.189660530.523101222.24161157 2.331691 4.301985BBX30
RAP2.4 7.6127370.186530160.000000000.057415180.252485500.4793959530.780960791.421746030.198875370 1.7253102.510018AT1G780800.309900680.186530162.88097814 1.911840 4.235328RAP2.4
NAC083 8.1524160.454524450.000000000.172165561.281201860.8581586290.595633270.169659810.401886807 1.4790942.740092AT5G131801.453367420.454524452.02533852 1.933618 4.219185NAC083
In [293]:
options(repr.plot.width=6, repr.plot.height=4)
ggplot(rc_rank[1:10,], aes(x=reorder(GeneName, rc, decreasing = FALSE),  y=rc)) + geom_point(size=4)+ 
  labs(title="Root Cap-specific TF Prioritization",x="", y = "Combined centrality score")+
  theme_classic()+
  theme(axis.text.x = element_text(color = "black", 
                           size = 16, angle = 0),
          axis.text.y = element_text( color = "black", 
                           size = 16, angle = 0),
        plot.title = element_text(color="black", size=18, face="bold"),
        axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
No description has been provided for this image
In [294]:
write.csv(rc_rank,"Root_Cap_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
In [295]:
tf_rank <- rc_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])

p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])

p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
In [296]:
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
In [297]:
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Root Cap", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
          plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
                    ,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
                    ,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
No description has been provided for this image
In [ ]:

In [ ]: